From patchwork Fri Jul 21 03:51:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Zink X-Patchwork-Id: 13321304 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 C81BFEB64DD for ; Fri, 21 Jul 2023 03:52:25 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IwzcuuWJ3cTHCEsehDJjcmyOMoogStpowMnrEq8+TFc=; b=TU0i7G6w5T6OSW 0W0uZDrgVDK3GWy2vO4UujpMvS8HNtHuFWq/CoC37zUsqVT3OeMwV2qXIlmX2GbgwJ3r2ylADliYU vm0ujEsGkWht0tNAwpE6nRrqWu+JanNGNaIwssdyQOmEqmirDRp5lOXAOMFUz2YOFvc5DOO/yPoOT 9UrKCpTX82oqX8hAM+c5wI0qhnqluHj9jCW9Q+DowYGtTLj/1hhvm8L6zhS8tcI4H8Uhg+M0PV2V2 PUVC01WRDT89toCYH7nUUuxNdHuspaVXDS4D0tABUU9pUgmSKvBxatrmvUwBZMIhufjGoyOxZBwnv AMHCS/l9crJ/XZM6Vzfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMhBU-00CleY-04; Fri, 21 Jul 2023 03:52:04 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qMhBR-00Cle0-0N for linux-arm-kernel@lists.infradead.org; Fri, 21 Jul 2023 03:52:02 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qMhBL-0005xp-AC; Fri, 21 Jul 2023 05:51:55 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qMhBJ-000yi9-KE; Fri, 21 Jul 2023 05:51:53 +0200 Received: from localhost ([::1] helo=dude03.red.stw.pengutronix.de) by dude03.red.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qMhBI-002zpJ-UD; Fri, 21 Jul 2023 05:51:53 +0200 From: Johannes Zink Date: Fri, 21 Jul 2023 05:51:48 +0200 Subject: [PATCH v2] arm64: dts: imx8mp: use correct clock for eqos timestamping counter MIME-Version: 1.0 Message-Id: <20230719-imx8mp_enet_qos_use_125mhz_clock-v2-1-eed15d74bfd1@pengutronix.de> X-B4-Tracking: v=1; b=H4sIANMAumQC/5WOSw6CMBRFt0I6toZXlY8j92FIU8qTvggttkBQw t6t7MDhOYN77soCesLArsnKPM4UyNkI4pAwbZRtkVMTmYlUnNIcSk79UvSDRIujfLkgp4ASxKU 3H6k7p58c9DkD0GVe1orFmVoF5LVXVps4ZKeui3Lw+KBl796ryIbC6Px7vzHDz/5RnIEDzwuhS 6UzBAG3AW07jd5ZWo4Nsmrbti+Rpowu6gAAAA== To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: patchwork-jzi@pengutronix.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Johannes Zink X-Mailer: b4 0.12.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: j.zink@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230720_205201_150884_492AB153 X-CRM114-Status: GOOD ( 14.10 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The i.MX8MP Reference Manual rev 1 06/2021, section 11.7.2.5 "Timestamp Support" indicates the PTP timestamp clock expects a typical frequency of 125MHz. As this also improves the precision of the measured timestamps: assign appropriate 125MHz Clock parent. As no one except the timestamping counter uses this clock, there are no side-effects of this change in other peripherals. Signed-off-by: Johannes Zink Reviewed-by: Fabio Estevam --- Changes in v2: - not only set assigned-clock-parents but alkso assigned-clock-rates for IMX8MP_CLK_ENET_QOS_TIMER to 125MHz (found by Fabio's review - thanks!) - Link to v1: https://lore.kernel.org/r/20230719-imx8mp_enet_qos_use_125mhz_clock-v1-1-782c9ac6e121@pengutronix.de --- Changes: v1 -> v2: Worked in Fabio's Feedback - Thank you for your review! - not only set assigned clock parent to 125MHz but also set the assigned clock rate of IMX8MP_CLK_ENET_QOS_TIMER to 125MHz --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- base-commit: ba345b77fae7054d0cbd033283c47033e45db6d8 change-id: 20230719-imx8mp_enet_qos_use_125mhz_clock-1c4611c979ba Best regards, diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 6f2f50e1639c..84ecf07affb3 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1334,9 +1334,9 @@ eqos: ethernet@30bf0000 { <&clk IMX8MP_CLK_ENET_QOS_TIMER>, <&clk IMX8MP_CLK_ENET_QOS>; assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>, - <&clk IMX8MP_SYS_PLL2_100M>, + <&clk IMX8MP_SYS_PLL2_125M>, <&clk IMX8MP_SYS_PLL2_125M>; - assigned-clock-rates = <0>, <100000000>, <125000000>; + assigned-clock-rates = <0>, <125000000>, <125000000>; nvmem-cells = <ð_mac2>; nvmem-cell-names = "mac-address"; intf_mode = <&gpr 0x4>;