From patchwork Mon Aug 14 11:25:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriranjani P X-Patchwork-Id: 714291 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 A5150C41513 for ; Mon, 14 Aug 2023 12:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233228AbjHNMLy (ORCPT ); Mon, 14 Aug 2023 08:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233674AbjHNMLh (ORCPT ); Mon, 14 Aug 2023 08:11:37 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09079130 for ; Mon, 14 Aug 2023 05:11:35 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230814121133epoutp038a5b86c68f0503d3143572642296dc7d~7PsNLLX2R0128701287epoutp03L for ; Mon, 14 Aug 2023 12:11:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230814121133epoutp038a5b86c68f0503d3143572642296dc7d~7PsNLLX2R0128701287epoutp03L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1692015093; bh=ShySZtEk1+xwW7aJlNCSKMFk+9qm6buF6WBsZ7yCoqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wl7okINh5HOpZzZBJMVa2RMOOAsOJsoVeNAATuk4U9s8XeIlGWIbtuAqYaV3/ajO8 JRRY6IwHa4Spam/Oj3Masvzr1QAhLRNjYm+dFCCp7jVzqiTOcwXdqo2LXI+ALv7jdU n2v7wKi7E7CdtYh40BtfwBC1TOHN1kudXg/0agds= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230814121132epcas5p4a13dfe55bdac406e7b4c03e698892a7f~7PsMQfiT52655926559epcas5p4A; Mon, 14 Aug 2023 12:11:32 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.180]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4RPYCk5pZyz4x9Pr; Mon, 14 Aug 2023 12:11:30 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id AE.CF.44250.2F91AD46; Mon, 14 Aug 2023 21:11:30 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20230814112605epcas5p31aca7b23e70e8d93df11414291f7ce66~7PEg4nhhO2938329383epcas5p3i; Mon, 14 Aug 2023 11:26:05 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230814112605epsmtrp28467dd192218d7dfcdabb20054318b78~7PEg3jgEE1398813988epsmtrp2a; Mon, 14 Aug 2023 11:26:05 +0000 (GMT) X-AuditID: b6c32a4a-ec1fd7000000acda-27-64da19f210fc Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 17.E3.14748.D4F0AD46; Mon, 14 Aug 2023 20:26:05 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230814112602epsmtip2baeb90e73160c49db1ce52ff1828bd87~7PEd_DqyY1008410084epsmtip2S; Mon, 14 Aug 2023 11:26:02 +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 Subject: [PATCH v3 1/4] dt-bindings: net: Add FSD EQoS device tree bindings Date: Mon, 14 Aug 2023 16:55:36 +0530 Message-Id: <20230814112539.70453-2-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: H4sIAAAAAAAAA0VTfUxTVxTf7WvfK46ylyJ4IerII5rBwkeVjwsCNhszT3SjDjOTLYIdfaMN pe3aMpnJBgEr4hRFB1sQEYHMAALalo6vdgQqm2CQAcMBsgjIx4AhtgR1i2Qthe2/3/md3++c c8+9l4vxe3BfrkyhZdQKsZzCt7BNXQGBQTafUUlo/cvd6OWfJQA9Ljfh6Ja5j4XKHpxmo+vW Pg6a7p4k0B+VSxxUODeBoX5TIQfpp4Y5aGL+GBpsLcPR9w8sLFT+qp6Duiu80WrvIkCVTSsE mlhuJ5D1/hyGdGYrgcYWGzho5c4IIfSmjTUjLHr6YhNBt5SOE3SFPpPW1xbg9KPhdpw2VGfT Ty2/4XShsRbQxp/sgF7LvUbQdv1OkfvH6TFSRixh1H6MIlUpkSnSYqlDSSnvpoRHhAqCBFEo kvJTiDOYWCr+sCjogEzuODDl94VYnumgRGKNhgqJi1ErM7WMn1Sp0cZSjEoiV4WpgjXiDE2m Ii1YwWijBaGhe8IdwhPp0o7GZkJVEpA1sHaenQOKd5wDblxIhsGR6k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eVNJo+n/VvZPXbOusvusWBTqcemVZ1sHneu7WHz2Lyk3uP9vqtsHn1bVjF6bNn/mdHjX9Nc do/Pm+QCeKK4bFJSczLLUov07RK4Mg6s38FeME2z4tK/HpYGxqmyXYycHBICJhLbtn1mBbGF BHYzSuzZmAIRl5E4+WAJM4QtLLHy33P2LkYuoJpmJom+xbfAGtgEdCVar31mAkmICMxilpg3 eQUziMMscIFRYvWdu0wgVcIC3hINX1qBbA4OFgFVic2XikHCvAK2EpcW/2CC2CAvsXrDAbBt nAJ2Eh+u72GBuMhWYtfXpawTGPkWMDKsYpRMLSjOTc9NNiwwzEst1ytOzC0uzUvXS87P3cQI jiUtjR2M9+b/0zvEyMTBeIhRgoNZSYS3h/dWihBvSmJlVWpRfnxRaU5q8SFGaQ4WJXFewxmz U4QE0hNLUrNTUwtSi2CyTBycUg1MKXmWr22PSLM/0ujTtBUNWFL+UktIauKV9lqtY748nDNb D4Zsvsp4tnprnqHxep6k2X6LXzrO+3h68gLnSj3jt5opnywNZyzctfvxuqX7nHZUr7ATqrQ5 LyUmNUm3+0ezydZfYpvmvDoQ8XXVu4D2xZdsU7s3eWW+V/9hmrQ8cntQ1ymfkpYVzKujZARu yi0OXBGx+kwNm5iR35Pl198/urP31a+A09t/VnLVJqidb1/ZsT7tUaewcfKEbZpLt90N+bWm fNNOEeGPK593ua/8yOk1SeT78oeqZ/2iUwv7zI7cztGWsquPq5n8ttr9TL2K3747t75dtnF6 FfDt5/3cC5x/7TOY5jskin37UMXSr8RSnJFoqMVcVJwIAEGrb+8UAwAA X-CMS-MailID: 20230814112605epcas5p31aca7b23e70e8d93df11414291f7ce66 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230814112605epcas5p31aca7b23e70e8d93df11414291f7ce66 References: <20230814112539.70453-1-sriranjani.p@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add FSD Ethernet compatible in Synopsys dt-bindings document. Add FSD Ethernet YAML schema to enable the DT validation. Signed-off-by: Pankaj Dubey Signed-off-by: Ravi Patel Signed-off-by: Swathi K S Signed-off-by: Sriranjani P --- .../devicetree/bindings/net/snps,dwmac.yaml | 5 +- .../devicetree/bindings/net/tesla,ethqos.yaml | 114 ++++++++++++++++++ 2 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/tesla,ethqos.yaml diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index ddf9522a5dc2..0ced7901e644 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -96,6 +96,7 @@ properties: - snps,dwxgmac - snps,dwxgmac-2.10 - starfive,jh7110-dwmac + - tesla,fsd-ethqos-4.21 reg: minItems: 1 @@ -117,7 +118,7 @@ properties: clocks: minItems: 1 - maxItems: 8 + maxItems: 10 additionalItems: true items: - description: GMAC main clock @@ -129,7 +130,7 @@ properties: clock-names: minItems: 1 - maxItems: 8 + maxItems: 10 additionalItems: true contains: enum: diff --git a/Documentation/devicetree/bindings/net/tesla,ethqos.yaml b/Documentation/devicetree/bindings/net/tesla,ethqos.yaml new file mode 100644 index 000000000000..b78829246364 --- /dev/null +++ b/Documentation/devicetree/bindings/net/tesla,ethqos.yaml @@ -0,0 +1,114 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/tesla,ethqos.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: FSD Ethernet Quality of Service + +maintainers: + - Sriranjani P + - Swathi K S + +description: + dwmmac based tesla ethernet devices which support Gigabit + ethernet. + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + const: tesla,fsd-ethqos-4.21.yaml + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 5 + maxItems: 10 + + clock-names: + minItems: 5 + maxItems: 10 + items: + - const: ptp_ref + - const: master_bus + - const: slave_bus + - const: tx + - const: rx + - const: master2_bus + - const: slave2_bus + - const: eqos_rxclk_mux + - const: eqos_phyrxclk + - const: dout_peric_rgmii_clk + + fsd-rx-clock-skew: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to the syscon node + - description: offset of the control register + description: + Should be phandle/offset pair. The phandle to the syscon node. + + iommus: + maxItems: 1 + + phy-mode: + $ref: ethernet-controller.yaml#/properties/phy-connection-type + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - rx-clock-skew + - iommus + - phy-mode + +unevaluatedProperties: false + +examples: + - | + #include + #include + + ethernet_1: ethernet@14300000 { + compatible = "tesla,dwc-qos-ethernet-4.21"; + reg = <0x0 0x14300000 0x0 0x10000>; + interrupts = ; + clocks = <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_ACLK_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_HCLK_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_RGMII_CLK_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_RX_I>, + <&clock_peric PERIC_BUS_D_PERIC_IPCLKPORT_EQOSCLK>, + <&clock_peric PERIC_BUS_P_PERIC_IPCLKPORT_EQOSCLK>, + <&clock_peric PERIC_EQOS_PHYRXCLK_MUX>, + <&clock_peric PERIC_EQOS_PHYRXCLK>, + <&clock_peric PERIC_DOUT_RGMII_CLK>; + clock-names = "ptp_ref", + "master_bus", + "slave_bus", + "tx", + "rx", + "master2_bus", + "slave2_bus", + "eqos_rxclk_mux", + "eqos_phyrxclk", + "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>; + fsd-rx-clock-skew = <&sysreg_peric 0x10>; + iommus = <&smmu_peric 0x0 0x1>; + phy-mode = "rgmii"; + }; + +... From patchwork Mon Aug 14 11:25:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriranjani P X-Patchwork-Id: 714290 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 8E4BDC001DB for ; Mon, 14 Aug 2023 12:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233445AbjHNMMZ (ORCPT ); Mon, 14 Aug 2023 08:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233639AbjHNMMD (ORCPT ); Mon, 14 Aug 2023 08:12:03 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61FAE18B for ; Mon, 14 Aug 2023 05:11:57 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230814121155epoutp047cedfec7ccd14b05fba69380e724089b~7Pshyd6IH1425714257epoutp04P for ; Mon, 14 Aug 2023 12:11:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230814121155epoutp047cedfec7ccd14b05fba69380e724089b~7Pshyd6IH1425714257epoutp04P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1692015115; bh=yQL1nCfdeC/BqfpskPcmt0HqJGCIQXaR/ZeUo/AXbvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gpc7Wtp+6TABtqU51kBm42gGh0lE9QgrpRRPXxwAXECHM4ViwZg8dCuQR2awFM9Tl pMIlQWyxjMYKqfS/ymafKT9NA1duxhOjWN37LgtMZwfJoWKS5fsV2DUutEbIsYAoxU zYFSMpy0e9n/wuoSzZeR9gUp38nrJOJaThL/KScA= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230814121154epcas5p15d0c68b5386e489ea9dcf900bc25862a~7PsgrZTi82054920549epcas5p10; Mon, 14 Aug 2023 12:11:54 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.178]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4RPYD85Pmsz4x9Pq; Mon, 14 Aug 2023 12:11:52 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id FC.CF.55522.80A1AD46; Mon, 14 Aug 2023 21:11:52 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230814112612epcas5p275cffb4d3dae86c6090ca246083631c4~7PEnQl-i12722327223epcas5p2D; Mon, 14 Aug 2023 11:26:12 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230814112612epsmtrp26dbb42a22a28601006434158a8bd5ffd~7PEnPuEhi1398813988epsmtrp2d; Mon, 14 Aug 2023 11:26:12 +0000 (GMT) X-AuditID: b6c32a49-67ffa7000000d8e2-1e-64da1a08435f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 73.C5.64355.45F0AD46; Mon, 14 Aug 2023 20:26:12 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230814112608epsmtip223f22b20ba46d9f0f440c05e70ffe7a7~7PEjxyWXq0830608306epsmtip2d; Mon, 14 Aug 2023 11:26:08 +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 , Chandrasekar R , Suresh Siddha Subject: [PATCH v3 2/4] net: stmmac: dwc-qos: Add FSD EQoS support Date: Mon, 14 Aug 2023 16:55:37 +0530 Message-Id: <20230814112539.70453-3-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: H4sIAAAAAAAAA0VTbVBUZRT2vXfv3ovt0nWlfFsTaIsSlI/FZX0RIRNHL9UYkz9iHAvusFdg 2K/ZXSSYJkxYk42IHQWJ4Uu0KBJFWDdEWAFXmjECJmAJAwOUAmUQdglLo4ll0f495znnOc85 7weFi37mi6k0tYHTqVmlhL+WZ70eGBhMiW8pws7YX0Z/T5cANFZp5aPzbT0YKu/N46Eqew+B JrsmSHS7ZpZAhVPjOOqzFhKo8Y6DQOP33kP9LeV8VNprw1DlUj2BuqqfR4s/zgBUc3mBRONz rSQq62smkL17CkfGNjuJfp25QKCasWoCLVwaJndBxvLtMMZMfnGZZK6UjZJMdWMG01iXz2dG HK18pulcDvPANshnCi11gLFccwHm32MVJONq9I0XHEzfmcqxCk7nz6mTNYo0dUq05K0DibGJ EfIwabA0Em2X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YLe4tesdq0ffiIbPFhW19rBabHl9jtXj4Ktzi8q45bBYz zu9jspj3dy2rxbEFYhbfTr9htFi09Qu7xcMPe9gtZl3YwWpx5MwLZovWvUfYLW6/WcdqsejB AlaLLxtvsjtIeGxZeZPJ42n/VnaPnbPusnss2FTqsWlVJ5vHnWt72Dw2L6n3eL/vKptH35ZV jB5b9n9m9PjXNJfd4/MmuQCeKC6blNSczLLUIn27BK6Mz38nMhXc9ax40bGZpYGxzbaLkZND QsBEYt+dd+xdjFwcQgLbGSW6ty1khkjISJx8sATKFpZY+e85VFEzk8T7H4/ZQRJsAroSrdc+ M4EkRARmMUvMm7yCGcRhFpjLJHHh2xOgKg4OYQEnieXbrEAaWARUJZ5P+MgEEuYVsJV4t0gB YoG8xOoNB8CWcQrYSXy4vocFxBYCKtn1dSnrBEa+BYwMqxhFUwuKc9NzkwsM9YoTc4tL89L1 kvNzNzGC40oraAfjsvV/9Q4xMnEwHmKU4GBWEuHt4b2VIsSbklhZlVqUH19UmpNafIhRmoNF SZxXOaczRUggPbEkNTs1tSC1CCbLxMEp1cA05634/V2y0uf7j2/kkm+I3mf0fWthotm1KNUQ ry6ha/H75D6/OGgSy2fA/2rxHu2VT/m/7Otb/XGaseyeZy6rqxfxlpU3rmhm+915Jd9jrVOf 3zMLh68O07S/Si9VNTlUvO0GZ9ArNkZvb6mwlD3PGd4tk9jmcJV5/gURf/kl138zXLv/rnyZ 1XnvNv8u8Z877ugEGlSnCJmx1fzXdflecflo8eZbGw/WKLuVR82bydS4Y98ba6e/fTxp7/dO +yW1zFt5flDpVWuNp3lr1pV6X8mYzt6+zuuW2o3u064s8bMMzrRmrWZ2DRI4ZP5EbtGacuaO l42KU1lLPMIWaDOqe2revWI8pTGimPWD3CklluKMREMt5qLiRACfcQnkGgMAAA== X-CMS-MailID: 20230814112612epcas5p275cffb4d3dae86c6090ca246083631c4 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230814112612epcas5p275cffb4d3dae86c6090ca246083631c4 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 instance of the Synopsys DWC ethernet QOS IP core. The binding that it uses is slightly different from existing ones because of the integration (clocks, resets). For FSD SoC, a mux switch is needed between internal and external clocks. By default after reset internal clock is used but for receiving packets properly, external clock is needed. Mux switch to external clock happens only when the external clock is present. Signed-off-by: Chandrasekar R Signed-off-by: Suresh Siddha Signed-off-by: Swathi K S Signed-off-by: Sriranjani P --- .../stmicro/stmmac/dwmac-dwc-qos-eth.c | 172 ++++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 28 ++- include/linux/stmmac.h | 1 + 3 files changed, 199 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c index 61ebf36da13d..651a41e0dab9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "stmmac_platform.h" #include "dwmac4.h" @@ -37,6 +38,45 @@ struct tegra_eqos { struct gpio_desc *reset; }; +enum fsd_rxmux_clk { + FSD_RXCLK_MUX = 7, + FSD_RXCLK_EXTERNAL, + FSD_RXCLK_INTERNAL +}; + +struct fsd_eqos_plat_data { + const struct fsd_eqos_variant *fsd_eqos_inst_var; + struct clk_bulk_data *clks; + struct device *dev; +}; + +struct fsd_eqos_variant { + const char * const *clk_list; + int num_clks; +}; + +static const char * const fsd_eqos_instance_0_clk[] = { + "ptp_ref", "master_bus", "slave_bus", "tx", "rx" +}; + +static const char * const fsd_eqos_instance_1_clk[] = { + "ptp_ref", "master_bus", "slave_bus", "tx", "rx", "master2_bus", + "slave2_bus", "eqos_rxclk_mux", "eqos_phyrxclk", "dout_peric_rgmii_clk" +}; + +static const int rx_clock_skew_val[] = {0x2, 0x0}; + +static const struct fsd_eqos_variant fsd_eqos_clk_info[] = { + { + .clk_list = fsd_eqos_instance_0_clk, + .num_clks = ARRAY_SIZE(fsd_eqos_instance_0_clk) + }, + { + .clk_list = fsd_eqos_instance_1_clk, + .num_clks = ARRAY_SIZE(fsd_eqos_instance_1_clk) + }, +}; + static int dwc_eth_dwmac_config_dt(struct platform_device *pdev, struct plat_stmmacenet_data *plat_dat) { @@ -265,6 +305,132 @@ static int tegra_eqos_init(struct platform_device *pdev, void *priv) return 0; } +static int dwc_eqos_rxmux_setup(void *priv, bool external) +{ + struct fsd_eqos_plat_data *plat = priv; + + /* doesn't support RX clock mux */ + if (!plat->clks[FSD_RXCLK_MUX].clk) + return 0; + + if (external) + return clk_set_parent(plat->clks[FSD_RXCLK_MUX].clk, + plat->clks[FSD_RXCLK_EXTERNAL].clk); + else + return clk_set_parent(plat->clks[FSD_RXCLK_MUX].clk, + plat->clks[FSD_RXCLK_INTERNAL].clk); +} + +static int dwc_eqos_setup_rxclock(struct platform_device *pdev, int ins_num) +{ + struct device_node *np = pdev->dev.of_node; + struct regmap *syscon; + unsigned int reg; + + if (np && of_property_read_bool(np, "fsd-rx-clock-skew")) { + syscon = syscon_regmap_lookup_by_phandle_args(np, + "fsd-rx-clock-skew", + 1, ®); + if (IS_ERR(syscon)) { + dev_err(&pdev->dev, + "couldn't get the rx-clock-skew syscon!\n"); + return PTR_ERR(syscon); + } + + regmap_write(syscon, reg, rx_clock_skew_val[ins_num]); + } + + return 0; +} + +static int fsd_eqos_clk_init(struct fsd_eqos_plat_data *plat, + struct plat_stmmacenet_data *data) +{ + int ret = 0, i; + + const struct fsd_eqos_variant *fsd_eqos_v_data = + plat->fsd_eqos_inst_var; + + plat->clks = devm_kcalloc(plat->dev, fsd_eqos_v_data->num_clks, + sizeof(*plat->clks), GFP_KERNEL); + if (!plat->clks) + return -ENOMEM; + + for (i = 0; i < fsd_eqos_v_data->num_clks; i++) + plat->clks[i].id = fsd_eqos_v_data->clk_list[i]; + + ret = devm_clk_bulk_get(plat->dev, fsd_eqos_v_data->num_clks, + plat->clks); + + return ret; +} + +static int fsd_clks_endisable(void *priv, bool enabled) +{ + int ret, num_clks; + struct fsd_eqos_plat_data *plat = priv; + + num_clks = plat->fsd_eqos_inst_var->num_clks; + + if (enabled) { + ret = clk_bulk_prepare_enable(num_clks, plat->clks); + if (ret) { + dev_err(plat->dev, "Clock enable failed, err = %d\n", ret); + return ret; + } + } else { + clk_bulk_disable_unprepare(num_clks, plat->clks); + } + + return 0; +} + +static int fsd_eqos_probe(struct platform_device *pdev, + struct plat_stmmacenet_data *data, + struct stmmac_resources *res) +{ + struct fsd_eqos_plat_data *priv_plat; + struct device_node *np = pdev->dev.of_node; + int ret = 0; + + priv_plat = devm_kzalloc(&pdev->dev, sizeof(*priv_plat), GFP_KERNEL); + if (!priv_plat) { + ret = -ENOMEM; + goto error; + } + + priv_plat->dev = &pdev->dev; + data->bus_id = of_alias_get_id(np, "eth"); + + priv_plat->fsd_eqos_inst_var = &fsd_eqos_clk_info[data->bus_id]; + + ret = fsd_eqos_clk_init(priv_plat, data); + + data->bsp_priv = priv_plat; + data->clks_config = fsd_clks_endisable; + data->rxmux_setup = dwc_eqos_rxmux_setup; + + ret = fsd_clks_endisable(priv_plat, true); + if (ret) + goto error; + + ret = dwc_eqos_setup_rxclock(pdev, data->bus_id); + if (ret) { + fsd_clks_endisable(priv_plat, false); + dev_err_probe(&pdev->dev, ret, "Unable to setup rxclock\n"); + } + +error: + return ret; +} + +static void fsd_eqos_remove(struct platform_device *pdev) +{ + struct fsd_eqos_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev); + + fsd_clks_endisable(priv_plat, false); +} + static int tegra_eqos_probe(struct platform_device *pdev, struct plat_stmmacenet_data *data, struct stmmac_resources *res) @@ -411,6 +577,11 @@ static const struct dwc_eth_dwmac_data tegra_eqos_data = { .remove = tegra_eqos_remove, }; +static const struct dwc_eth_dwmac_data fsd_eqos_data = { + .probe = fsd_eqos_probe, + .remove = fsd_eqos_remove, +}; + static int dwc_eth_dwmac_probe(struct platform_device *pdev) { const struct dwc_eth_dwmac_data *data; @@ -482,6 +653,7 @@ static void dwc_eth_dwmac_remove(struct platform_device *pdev) static const struct of_device_id dwc_eth_dwmac_match[] = { { .compatible = "snps,dwc-qos-ethernet-4.10", .data = &dwc_qos_data }, { .compatible = "nvidia,tegra186-eqos", .data = &tegra_eqos_data }, + { .compatible = "tesla,dwc-qos-ethernet-4.21", .data = &fsd_eqos_data }, { } }; MODULE_DEVICE_TABLE(of, dwc_eth_dwmac_match); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 733b5e900817..3c7d55786aaa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3883,6 +3883,12 @@ static int __stmmac_open(struct net_device *dev, netif_tx_start_all_queues(priv->dev); stmmac_enable_all_dma_irq(priv); + if (priv->plat->rxmux_setup) { + ret = priv->plat->rxmux_setup(priv->plat->bsp_priv, true); + if (ret) + netdev_err(priv->dev, "Rxmux setup failed\n"); + } + return 0; irq_error: @@ -3936,7 +3942,13 @@ static void stmmac_fpe_stop_wq(struct stmmac_priv *priv) static int stmmac_release(struct net_device *dev) { struct stmmac_priv *priv = netdev_priv(dev); - u32 chan; + u32 chan, ret; + + if (priv->plat->rxmux_setup) { + ret = priv->plat->rxmux_setup(priv->plat->bsp_priv, false); + if (ret) + netdev_err(priv->dev, "Rxmux setup failed\n"); + } if (device_may_wakeup(priv->device)) phylink_speed_down(priv->phylink, false); @@ -7630,11 +7642,17 @@ int stmmac_suspend(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct stmmac_priv *priv = netdev_priv(ndev); - u32 chan; + u32 chan, ret; if (!ndev || !netif_running(ndev)) return 0; + if (priv->plat->rxmux_setup) { + ret = priv->plat->rxmux_setup(priv->plat->bsp_priv, false); + if (ret) + netdev_err(priv->dev, "Rxmux setup failed\n"); + } + mutex_lock(&priv->lock); netif_device_detach(ndev); @@ -7799,6 +7817,12 @@ int stmmac_resume(struct device *dev) mutex_unlock(&priv->lock); rtnl_unlock(); + if (priv->plat->rxmux_setup) { + ret = priv->plat->rxmux_setup(priv->plat->bsp_priv, true); + if (ret) + netdev_err(priv->dev, "Rxmux setup failed\n"); + } + netif_device_attach(ndev); return 0; diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 784277d666eb..69150c8c8df7 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -264,6 +264,7 @@ struct plat_stmmacenet_data { void (*ptp_clk_freq_config)(struct stmmac_priv *priv); int (*init)(struct platform_device *pdev, void *priv); void (*exit)(struct platform_device *pdev, void *priv); + int (*rxmux_setup)(void *priv, bool external); struct mac_device_info *(*setup)(void *priv); int (*clks_config)(void *priv, bool enabled); int (*crosststamp)(ktime_t *device, struct system_counterval_t *system, 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-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03VnaKRNUu0TvmKL5zMVxfp8VBR+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"; + }; }; }; From patchwork Mon Aug 14 11:25:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriranjani P X-Patchwork-Id: 713752 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 AD264C41513 for ; Mon, 14 Aug 2023 12:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjHNMM0 (ORCPT ); Mon, 14 Aug 2023 08:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234824AbjHNMMW (ORCPT ); Mon, 14 Aug 2023 08:12:22 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE541701 for ; Mon, 14 Aug 2023 05:12:16 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230814121214epoutp03e137f4ee9ddcb28b8589118ce984ecb1~7PszhSicn3258032580epoutp03x for ; Mon, 14 Aug 2023 12:12:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230814121214epoutp03e137f4ee9ddcb28b8589118ce984ecb1~7PszhSicn3258032580epoutp03x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1692015134; bh=Swnsn1chzI8f0TpyxK2ztAInnEpSxBH/YZuquN/a17I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jh1ZnCRyoTh5VZdeyEIqFiBspY2wr7CzN023CKV9KR/fpOcLsbSVkVuqCu07IYksM fNQvqCsux7Qz36DhwVwS4wvXSwt3D+gtxap6EtNEvUH8IS0A3q0AteFRwxm0oZ4XaM bevx6bL/zsefKyE3xJNglYOb0Vjy4bHjQicNCLiA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230814121213epcas5p464fb2bf583429fc26f8f04d37e7fb829~7Psy1q7x_2459824598epcas5p4e; Mon, 14 Aug 2023 12:12:13 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.175]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4RPYDX1snzz4x9Ps; Mon, 14 Aug 2023 12:12:12 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 3D.B5.55173.C1A1AD46; Mon, 14 Aug 2023 21:12:12 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230814112625epcas5p1e1d488a590bfc10d4e2a06dcff166037~7PEy-jfo11309013090epcas5p13; Mon, 14 Aug 2023 11:26:25 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230814112625epsmtrp189c8fe2b801fd0b150669709709596a2~7PEy_hBe71862118621epsmtrp1M; Mon, 14 Aug 2023 11:26:25 +0000 (GMT) X-AuditID: b6c32a50-df1ff7000001d785-66-64da1a1c457d Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 11.54.30535.16F0AD46; Mon, 14 Aug 2023 20:26:25 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230814112621epsmtip22379e2036ae72fd7ed5810d780f5ac9f~7PEvOvSrB0830008300epsmtip2N; Mon, 14 Aug 2023 11:26:21 +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 4/4] arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC Date: Mon, 14 Aug 2023 16:55:39 +0530 Message-Id: <20230814112539.70453-5-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+NgFjrPJsWRmVeSWpSXmKPExsWy7bCmpq6M1K0UgzPv2C1+vpzGaPFg3jY2 izV7zzFZzDnfwmIx/8g5Vounxx6xWxw5tYTJ4t6id6wWfS8eMltc2NbHarHp8TVWi4evwi0u 75rDZjHj/D4mi3l/17JaHFsgZvHt9BtGi0Vbv7BbPPywB6j9zAtmi9a9R9gtbr9Zx2rxZeNN dgdxjy0rbzJ5PO3fyu6xc9Zddo8Fm0o9Nq3qZPO4c20Pm8fmJfUe7/ddZfPo27KK0WPL/s+M Hv+a5rJ7fN4kF8ATlW2TkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk 4hOg65aZA/S1kkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafApECvODG3uDQvXS8v tcTK0MDAyBSoMCE74+2NDewFE9QqOjbcZGpg3CffxcjJISFgIjHvTidLFyMXh5DAHkaJFb2r GEESQgKfGCUWbvGASHxjlHiy/xYjTMeUwxeZIRJ7GSWWLbzFDNHRyiSxsIEfxGYT0JVovfaZ CaRIRKCNWWLNpylgHcwCnxkl1nxYDjZKWCBKYm/zZDCbRUBV4s//yWCTeAVsJbqW32KFWCcv sXrDAbA4p4CdxIfre1gg4m84JK7fc4GwXSQm/3gDFReWeHV8CzuELSXxsr8Nyk6X2HxkM9TM HImOpmZ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ISK/89ZwexhQSamSTuN6eA2GwCuhKt1z4zgTSL CMxilpg3eQVYA7PAT0aJDYclQWxhgQiJpadOgw1lEVCV+PN/MlgNr4CtRNfyW6wQC+QlVm84 ABbnFLCT+HB9DwvEMluJXV+Xsk5g5FvAyLCKUTK1oDg3PbfYsMAoL7Vcrzgxt7g0L10vOT93 EyM4qrS0djDuWfVB7xAjEwfjIUYJDmYlEd4e3lspQrwpiZVVqUX58UWlOanFhxilOViUxHm/ ve5NERJITyxJzU5NLUgtgskycXBKNTCdWamudytNsd9tY7rE9R/vpE6ctBCabKLTsTvVlHXW 5Nj6klADd8XQ23vKJ8TtezRvck1ztOSmwK68BXm58yauyzWM5l26av2N6qPX8rxzJszh+yW1 /PxEvnNPj4t2ngv+scQyuOnV06Dow2qaMksi9OzDAhJ/T40vSOy89k/Qr3f577+hv3WM7eOz 8p4zsZ/oX8ju9+jVTf+Nj2Otaxj6n7wQ7rTJbesUO3B3lbztUVGn0ufZKlsCO5/2OFnfvbph jpyWRA+H287y7gtnTupuPGSzTq1z1yqn6w+DTnr4Ou/gsF2WK3TI5d+2NRVPN/1QY+hd4TUn aavItwdNmrvKZQ/fWPz1duexK/MmRqUrsRRnJBpqMRcVJwIAul+XghkDAAA= X-CMS-MailID: 20230814112625epcas5p1e1d488a590bfc10d4e2a06dcff166037 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230814112625epcas5p1e1d488a590bfc10d4e2a06dcff166037 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 PERIC 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 | 29 +++++++++++ 3 files changed, 94 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 2c37097c709a..80ca120b3d7f 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -73,6 +73,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 cb437483ff6e..6f4658f57453 100644 --- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi @@ -437,6 +437,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 9a991f021711..ce5d5f8546b9 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 { @@ -1006,6 +1007,34 @@ phy-mode = "rgmii"; status = "disabled"; }; + + ethernet_1: ethernet@14300000 { + compatible = "tesla,dwc-qos-ethernet-4.21"; + reg = <0x0 0x14300000 0x0 0x10000>; + interrupts = ; + clocks = <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_ACLK_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_HCLK_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_RGMII_CLK_I>, + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_RX_I>, + <&clock_peric PERIC_BUS_D_PERIC_IPCLKPORT_EQOSCLK>, + <&clock_peric PERIC_BUS_P_PERIC_IPCLKPORT_EQOSCLK>, + <&clock_peric PERIC_EQOS_PHYRXCLK_MUX>, + <&clock_peric PERIC_EQOS_PHYRXCLK>, + <&clock_peric PERIC_DOUT_RGMII_CLK>; + clock-names = "ptp_ref", "master_bus", "slave_bus", "tx", "rx", + "master2_bus", "slave2_bus", "eqos_rxclk_mux", + "eqos_phyrxclk", "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 = [00 00 00 00 00 00]; + fsd-rx-clock-skew = <&sysreg_peric 0x10>; + iommus = <&smmu_peric 0x0 0x1>; + phy-mode = "rgmii"; + status = "disabled"; + }; }; };