From patchwork Tue Jul 30 09:16:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swathi K S X-Patchwork-Id: 13747126 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B3E019E7E6 for ; Tue, 30 Jul 2024 09:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722331759; cv=none; b=NrF25qlMmFVAz0M8m070hQWxWV/XX13k4wG5SzRMbDkgXlrJXwgYWpOnauNImdlNTq6pQWrRlZXeDL3VBexbpkToUbq/vn60pRYcT8R18yA4At5Uwmh5RVH3MjEmHPN3U5Btae3jJjefB3/x3iM5i5mioLNZHINYwV2bKWsdVr8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722331759; c=relaxed/simple; bh=XJlfX/Cxbl7wGYmVSBOCnAU/0gd78zln6g8xLfY19VQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:Content-Type: References; b=fxVEQgwG0YKETMeQRJQOWlx3MJwtqYIIJSilRNCb+dXwdCFTWdFoYmy6Kcwy090jBUFic+5b8O9l+/MQI93JrxWonq91rWa1IyVXK5IiIX0Fe61/izOvymk36fksPXg3T0IKVInEilMHrnl4tkVb/GQUABASvNZ8MPm0lJJb9mM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=KeBd+9iy; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="KeBd+9iy" Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240730092915epoutp01841bb0a29d2763ae03db3b9f08e73de8~m85snc1342544825448epoutp01i for ; Tue, 30 Jul 2024 09:29:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240730092915epoutp01841bb0a29d2763ae03db3b9f08e73de8~m85snc1342544825448epoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1722331755; bh=x0Y1A7InRF8vrl8GqcbCO2WSkPOfVgrttHPpaop2MQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KeBd+9iydQFUm9GNlfH46a6cTYhmdN8V8D/8KIhvnq3mRQoX3LqSdokMasUpNlzar y9VeKDzUWncRwc1OjioubYW0c7N9smJ+YvuyYvDXYp1Xa1jkgjLMqteojXTJWeUFHf W7J0NV8Uab8O7vmLKjPnFaYc49ruiZp1xeEAh+DA= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20240730092914epcas5p1845e9c9930e6c9699489db235b5fb0ac~m85r_36ru2390023900epcas5p1S; Tue, 30 Jul 2024 09:29:14 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.176]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4WY90S5vSfz4x9Q5; Tue, 30 Jul 2024 09:29:12 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 10.6E.19863.862B8A66; Tue, 30 Jul 2024 18:29:12 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20240730092907epcas5p1b81eaf13a57535e32e11709602aeee06~m85l0inV32395223952epcas5p1O; Tue, 30 Jul 2024 09:29:07 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240730092907epsmtrp1db888233e42037ae1ea78c458750ad04~m85lx-rqu2339923399epsmtrp1z; Tue, 30 Jul 2024 09:29:07 +0000 (GMT) X-AuditID: b6c32a50-ef5fe70000004d97-ff-66a8b268129c Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id E0.8D.19367.362B8A66; Tue, 30 Jul 2024 18:29:07 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240730092904epsmtip2deaca156e95ad97a1d73906a62481768~m85iPufd-2110921109epsmtip2i; Tue, 30 Jul 2024 09:29:03 +0000 (GMT) From: Swathi K S To: krzk@kernel.org, robh@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, richardcochran@gmail.com, mcoquelin.stm32@gmail.com, andrew@lunn.ch, alim.akhtar@samsung.com, linux-fsd@tesla.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, alexandre.torgue@foss.st.com, peppe.cavallaro@st.com, joabreu@synopsys.com, swathi.ks@samsung.com, rcsekar@samsung.com, ssiddha@tesla.com, jayati.sahu@samsung.com, pankaj.dubey@samsung.com, ravi.patel@samsung.com, gost.dev@samsung.com Subject: [PATCH v4 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Date: Tue, 30 Jul 2024 14:46:47 +0530 Message-Id: <20240730091648.72322-4-swathi.ks@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240730091648.72322-1-swathi.ks@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTe0xTZxTPvbftLS41l8fwg6CDmjlhAu0s7ANlY5Po3SuSmGyOZdY7em2B 0nZ9MJGYVXwwUIuwsPGSNQxmebmuFCyuIDAULUIhQx7JcMhopnQOeUR8IWtpcf/9zu/8fuec nPN9bMxvkRXMTpOpaaWMknJZ6xitv4WHR0pMhkO8B50R8PG97xA4WdXKgvaJbgw2tg+gsNJ+ ggF/6BlgQse1KRyOd7ahsMdWg8Lb1f8yod1uxOFgq44JTX+NMOGdmU/g75crWbDU3oHCgpFp JqxabmLCa/pA+LDvHwRWtyzicMXZgsA7D6w4LB+0MGHPzbsYXLFacFg9qWfCxV/G8cQQ0lw3 jpKOwhacbCufwEm9SUOa6vNZZHPN12SbZQElZztusUiduR4huzr4pONRO0aarywg5PPc8zi5 YNqUvD4lY6eEpkS0MpSWpcpFaTJxAveDfcJdwphYHj+SHwff5IbKqEw6gZv0YXLk7jSpay/c 0CxKqnFRyZRKxY1+a6dSrlHToRK5Sp3ApRUiqUKgiFJRmSqNTBwlo9XxfB7vjRiX8GCGpPHZ BK74M+zw1aJ6VIt8E1KA+LABIQBztb14AbKO7UdYEVAy9oTlCeYRsHSuCH0RHC+awNcs7a2l iCfRhoDmP257LSdR8FOtluVWsYitYNRwabVwAKFFQfH9IcwdYMQVDIzrHAy3yp9IAUM3Rl0J NptBvAoa7L5umkPEg0bTEsvT7hXQYOzE3NiH2AEu3Heu1gFEhQ84PWZgekRJoKE012vwBzO9 Zu+sweBe4SkvFoIG3S2GB0vAxJMir/5t0DlcyXDPgBHh4OfL0R56IyixXUTdGCPWg7NPp1EP zwGWqjW8GSw7R7wlg0Br7ay3FQm0U8+9K9Ih4PubF5jnkE3l/7fQI0g9EkwrVJliOjVGwY+U 0V+9OFyqPNOErD7/iGQL0mBcjupGUDbSjQA2xg3gCIdrD/lxRFT2EVopFy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MXqp+B80BUBdwMQMJmcKlJqfEZIYGc MpXTpCUFxqenGsHiI/2jLOBaw1ygDWAUsAFI4VJPYdyLq4liYYLyWA6rTo9Ta1QsZwNrKJ50 ldBPdTZBTCcpM9kjLJvBqv+nGCXwOoldu3jadiG2IDdLEhTnsTxU4bh4iJfz1C94/WjfuUm9 f4wkLMCtjgh9J4rO21kiKBa2HS1p2DfxzRZcn+xje1zaoT+4W6SbWW4O0/iZ4u3HZcz3sInY 9vqyCMn+nJqAP9uRNdK6S/vSqaC0/lwPf4/br4nMW/uSuqd6Mfk9lbw0clIRrJrqjlKbY2UH U3wtjdmXv4jLvSocXcrcdTEjCkXX9qGCPeHW/nSWjt30qjpiULJZMAvumqrVW7NfG0diahif ZSnOU8eja3PNEduKCwtjpmVaD51m0NtL+1XeEPEbanaHd5YXThXukNeAjQuVtzhubYWIizIk ylqW8aQ87rAyxB9Xc8q/GodSHTcDAAA= X-CMS-MailID: 20240730092907epcas5p1b81eaf13a57535e32e11709602aeee06 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240730092907epcas5p1b81eaf13a57535e32e11709602aeee06 References: <20240730091648.72322-1-swathi.ks@samsung.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 --- 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 | 20 ++++++++ 3 files changed, 85 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 690b4ed9c29b..cc67930ebf78 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -1007,6 +1007,26 @@ clocks = <&clock_fsys0 UFS0_MPHY_REFCLK_IXTAL26>; clock-names = "ref_clk"; }; + + ethernet_0: ethernet@15300000 { + compatible = "tesla,fsd-ethqos"; + 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]; + iommus = <&smmu_fsys0 0x0 0x1>; + phy-mode = "rgmii-id"; + status = "disabled"; + }; }; };