From patchwork Mon Apr 11 12:11:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 12809072 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 D6B92C433EF for ; Mon, 11 Apr 2022 12:13:11 +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:MIME-Version:Message-Id:Date:Subject:Cc :To: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=jBzTi7R/AsJLPYcoDI026HU9OP9dCV7TyOeYgCgwjug=; b=jL7XQ7kLogWOc3 1PFg83rT2mr3w0HVax2WHvAuUNPoavhxUM8f9UK/ahsBK5W9jnVjZg2uyhFksZCnN2VS3XJ0vCwyT 2cwNHqt4QVB+Cjh4A0c1lgg5xQF5vczGyly2wrKgB5XoFkKECqnbkXVi0hfulNsYIqdcd7MKGATRd USxTOFoGBqjbxI8nGOqSUGFmsHEFSQS3mP0uMoIAuMxbeRXBypKs0O3yt0p5e3iaPTwlKSESXi00A nov1SXo8whLTw8LHz+RkLfPbVvSSv07/dippx31Blp82G7XEW8Xy5g0S+SE0+CAQ59RJiySr29cXq akhqQ8Qeyndogd5d5kcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndstq-008u1G-1f; Mon, 11 Apr 2022 12:12:06 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndstD-008tmM-SX for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 12:11:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1649679087; x=1681215087; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1ihRXxFS8SkHT5FGn2iF3um7fIEpIDhvWzzhLfWwh4k=; b=ahk8BdXtKaQmgINPjxKm+3QhJhZWICyAAvN7Uku2EXEt6B78H1zFJpEA +RqPAN7IHXndYGgEVgOSfrrpof81xszZPBAKQ2TBgG7jcBeg+IlvzTVD7 j0echz+3s6kM/xrI8Iy6rDEt8PfDpRdxAZgeDiRgW3jntP0PtN5sgN2G8 UMosGYkidmTmEGJhiF8FyJJQIfq4WUUkHZoNgdEi3Ifj5UAJnunJ9jXVx xRp3Qd9aiCxIWR0e/fSveZJNyqTEtVaSfskySOyQpgmu1J0/nHmmgAboG BKtP2M0cDAVjTVq02I5PN3+7lO2SjMBszRIkUxLn1zZ5GXDMC7li52JdM A==; X-IronPort-AV: E=Sophos;i="5.90,251,1643670000"; d="scan'208";a="23222027" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Apr 2022 14:11:21 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 11 Apr 2022 14:11:21 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 11 Apr 2022 14:11:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1649679081; x=1681215081; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1ihRXxFS8SkHT5FGn2iF3um7fIEpIDhvWzzhLfWwh4k=; b=T5Nish/2oK4T/TgyH1Tua8Txbe9CwgAcjMOsa9b8lQCpBLNGQdmCmInM 2fYU5S4vcXWUj10xfzy3Cst076/B4J8s/ypx3flXw+y0rDpuvPBoxjogA q2lSpPg2rKLyV6vuWxRkw0heeHcktDLJ4qhbvs3Gol7wjQa5kL58QvJKv Rwdyyz159lUu36cyc5bRfHpGofnr5fVEoIutqF+XCtTA2viAB2X3CI0fx HIY48+AYgyYbLDxhN8k8LCMCDspwCp1PycRH/m++gwTaqwu0+UTc4//8d hJnlD+hXZHBz2EpupnJnlsq1fi4Ug4LlChlXVin/NOXVw/IdV6weobsN8 w==; X-IronPort-AV: E=Sophos;i="5.90,251,1643670000"; d="scan'208";a="23222026" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Apr 2022 14:11:21 +0200 Received: from localhost.localdomain (SCHIFFERM-M2.tq-net.de [10.121.49.14]) by vtuxmail01.tq-net.de (Postfix) with ESMTPA id 9C134280070; Mon, 11 Apr 2022 14:11:20 +0200 (CEST) From: Matthias Schiffer To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Schiffer Subject: [PATCH] arm64: dts: ti: k3-am64-mcu: explicitly assign UART base clock rates Date: Mon, 11 Apr 2022 14:11:08 +0200 Message-Id: <20220411121108.63436-1-matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_051128_383243_463A9389 X-CRM114-Status: GOOD ( 11.94 ) 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 We found that (at least some versions of) the sci-fw do not assign the expected base clock rate of 48 MHz for the UARTs in the MCU domain, leading to incorrect baud rates when used from Linux. Use assigned-clock-rates to fix this issue. Fixes: 8abae9389bdb ("arm64: dts: ti: Add support for AM642 SoC") Signed-off-by: Matthias Schiffer --- I'm not sure if this is the best fix. Should the clock-frequency property simply be removed, so the frequency is queried from the clock driver instead? arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi index 2bb5c9ff172c..69b0f127eea5 100644 --- a/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64-mcu.dtsi @@ -15,6 +15,8 @@ mcu_uart0: serial@4a00000 { power-domains = <&k3_pds 149 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 149 0>; clock-names = "fclk"; + assigned-clocks = <&k3_clks 149 0>; + assigned-clock-rates = <48000000>; }; mcu_uart1: serial@4a10000 { @@ -26,6 +28,8 @@ mcu_uart1: serial@4a10000 { power-domains = <&k3_pds 160 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 160 0>; clock-names = "fclk"; + assigned-clocks = <&k3_clks 160 0>; + assigned-clock-rates = <48000000>; }; mcu_i2c0: i2c@4900000 {