Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3177021lqo; Wed, 15 May 2024 01:53:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVywAT/WVduyVjY4AIPiDS6iHau92X7VvmufChR3GUR84svenBYWegLMVMVOrwohBdrTXKXRBtkMCSx90sc2Hjwt5SjIKH8nJREWWInpQ== X-Google-Smtp-Source: AGHT+IGiuvt67UijHFf+loUoN8YQR+/5fEVLKv+tmBsAgZDov9y4xHy5KVtILKTzFUyYkMiF/H6V X-Received: by 2002:a05:6a21:3d85:b0:1af:6a15:6825 with SMTP id adf61e73a8af0-1afde1978d0mr20526332637.42.1715763193059; Wed, 15 May 2024 01:53:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715763193; cv=pass; d=google.com; s=arc-20160816; b=DPTpzvhY41K/ZKlueFWYGr3nCiM53Hw1QKPXV8vqerpXDkC9e5UVoVWNJ3bgRjyOy+ lwurRhaAjRyHy4nHp1hZHaVO2YmbVX+1gPk3ultGBk2mS+bbLYUAsQUBF4q2ofYIs08s 9/FO3//xjuZqTxtKqkUb756FWDoFpxta1+FszIGt4kMI3Z7hZ69woYrvY/X/T1RFhN9L pwnlcUi83fBGcPTusKO11MMVsf+s2S6RdMdwowcQoFT0wehiRB4R1eyHDnZ2NC6736Ar rpmvtcDS1o3Y4+dZPQg9fY8rVwNeSk4wHT2v21wb3TumkBYWrinCYGGaRiG0DjW/NKpl 0fWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FPZC2tLZzoMwQUMQ/NsgDeMOgcmg6uOukKnCCk0Jz0k=; fh=Dbeq9W0+DtPnDOCvYwZPfPiyJdknrzMYGI26LO2mQtE=; b=0UweA6S1AuxyP0ANbwV5CBCtlbeVKs/4D0KB6M/5M5wfm7AtZTbEn46b5tSOOfwcA7 rt+GqAD74+X4z6tB5NAQyfMuIKMrO3T0sPHvYorSbtKo3AOc0CjB9EGsGv1zi8rAM/wJ DcD87VA8vRbvfpdrhH4LQ7jW3HLL0AMzdeS0H/PAMhK7z2h2yY9oV9NSM5bXno2xL9EN +DFWUUKL5zPBAudtM0SPsyDfdYv0WQESrVEpkjNT40MFJzeIzNiTY1xutoSEaVv/rGwy qyWEQd1CC+eDclxbgG8kbmoEYUweptRmyZ3W7VyD2YyizGWIigGV+2kp8LPPkRpXcwCc gDBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ehau8T/9"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-179668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179668-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b67177e6c8si13460206a91.171.2024.05.15.01.53.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 01:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ehau8T/9"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-179668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179668-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 32BC0B22BA4 for ; Wed, 15 May 2024 08:52:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F7AD5811A; Wed, 15 May 2024 08:52:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ehau8T/9" Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B7224EB2C; Wed, 15 May 2024 08:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715763121; cv=none; b=dKE3XndicLvjYMs2vYF4/whqJmVRg7/gJlQvtwFgrruVO/Srajr5y+6Sxae7QZYA7pDQEWPdyH3fwbnKPl+RSKHmBOx2YkSCSVEiCCf0lQWj1TMqjD55u3DGiIuSt511wBVJKRubzH0d5bCQIptkuDXMmKln3J8rEu9PTfBjDno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715763121; c=relaxed/simple; bh=oTabfecnA5D6rgAYnH/cITmgBhG9NMBzhJBXZpNVt9U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YVuxA94TSepeaZNFn1dxD40WrTMUQlpidBqoKPsJIBKQGUtd9rOewiGCHxdMJesnmG7JLUj+WNZs34VeWm8Ds12Kgr5ad+eR/KBxtT3qxLNtyjIeew1GcH4LKCazUa/HVpdYCQ2xGmRQ4ebcmD1dEkXk/D3PpIqHitZdsafXBac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ehau8T/9; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3504f34a086so4123575f8f.1; Wed, 15 May 2024 01:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715763118; x=1716367918; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FPZC2tLZzoMwQUMQ/NsgDeMOgcmg6uOukKnCCk0Jz0k=; b=ehau8T/9aqP24xoVvkdyLfjY72TLtg2sqIZzglkBztULwZWHgZzx2ZX9M/7LDH4w57 qEFXaLtHrygpeimU7vx8TbdMpcfF05SQ2Vpl0KarOlhN0MJaaq3Ei6otaT0oHVSWdyBY 9KVOSW55K//WW8anXsLPfHE/+Afyfff1mUb0qohFPEE3hrl4dN9zKR93o2bk8bmd2eUs EgoGtMbhpVu8W+jBsMdwgNH7h3sy/PNTE/89ZtVt3mtCwmZDxm2HVrHnFXiO/j26N1ua mEYSVDxxGYwsfx0ORBZZK+D5nrU4TxMAFAFuasgTt9AQJbxQmr+6uDEQ6ZDja8FbIbi3 WLww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715763118; x=1716367918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FPZC2tLZzoMwQUMQ/NsgDeMOgcmg6uOukKnCCk0Jz0k=; b=ipS0YFsrR87xpxubAWnon6b7yJMwwOcntdZWJM1bu5XgBSg2JPHLfMBH7AnxG3bGed mftdAJ59nkkDMrOcJOwGQ9Q3Ph8dlH7m4Y09udH2VoK5Ety+ZlWx6YgbGLwkW/KODMWt bYS/3MWZGqA0GNcst9yCKjZ1Lmkg+N6R3D1A1ixx0ruDYxpIou8D+2ckWognBj+j6QKR A65D5cXRurSVG6K6Y82ElaG3MLy3iAB95Z0OHjGG+9wtxKzQgFFZdaSRBciwMWGAexT3 SDJtYzeJBsI18391jEPy7swGBWkrAW/lkZFrcwcweHqwxX5vGwvPl59TdVoxka9XO6rW G8vQ== X-Forwarded-Encrypted: i=1; AJvYcCWTTxbJ9NB3PddSdUakpR7fcyXr7FRl3T8r5DRnezRDomRhO5ptJCE8PpTrXm7fyXOG7GDfeMp+NmlKvkxOYI3bL5OwmevDxk14tEapfk72eMnyT9mP16XRsQiRIA20Jy5V6C/a3Q== X-Gm-Message-State: AOJu0YyMdlxBiZwy8erGY2DCs607jDwMQHkCa4m97+eTkh9uveY406dt YCL1MBU+iAxSld6dyOcRIpcBlhKAppZnTwceQAIt92GD1zkTrty2hlADpw== X-Received: by 2002:adf:fc08:0:b0:34c:cca6:3d18 with SMTP id ffacd0b85a97d-3504aa66a33mr10191172f8f.68.1715763113485; Wed, 15 May 2024 01:51:53 -0700 (PDT) Received: from ALPER-PC.. ([178.233.24.52]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502b8a8454sm15825034f8f.56.2024.05.15.01.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 01:51:53 -0700 (PDT) From: Alper Nebi Yasak To: linux-kernel@vger.kernel.org Cc: AngeloGioacchino Del Regno , Rob Herring , linux-clk@vger.kernel.org, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-mediatek@lists.infradead.org, Michael Turquette , Conor Dooley , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Chen-Yu Tsai , Matthias Brugger , Stephen Boyd , devicetree@vger.kernel.org, Alper Nebi Yasak Subject: [RESEND PATCH v2 2/2] arm64: dts: mediatek: mt8173: Fix timer 13 MHz clock description Date: Wed, 15 May 2024 11:51:05 +0300 Message-ID: <20240515085137.2842804-2-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240515085137.2842804-1-alpernebiyasak@gmail.com> References: <20240515085137.2842804-1-alpernebiyasak@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A previous patch fixes an issue with the mt8173-infracfg clock driver when working as a module, but has the side effect of skipping set up of CLK_INFRA_CLK_13M in that case. This clock is used by the timer device. Similar to the MT8183, MT8192, MT8195 and MT8186 cases [1], change the input clock of the timer block a fixed factor divide-by-2 clock that takes the 26 MHz oscillator as its input. Also remove the RTC clock from the timer node while we're here. According to commit 59311b19d7f63 ("clocksource/drivers/timer-mediatek: Add system timer bindings") it is no longer used. [1] https://lore.kernel.org/all/20221201084229.3464449-1-wenst@chromium.org/ Signed-off-by: Alper Nebi Yasak --- Tested on a MT8173 Chromebook. But I'm not sure I understand all of this, so review with a pinch of salt. Changes in v2: - Add this patch arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index 3458be7f7f61..809b379b6818 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -244,6 +244,15 @@ psci { cpu_on = <0x84000003>; }; + clk13m: fixed-factor-clock-13m { + compatible = "fixed-factor-clock"; + #clock-cells = <0>; + clocks = <&clk26m>; + clock-div = <2>; + clock-mult = <1>; + clock-output-names = "clk13m"; + }; + clk26m: oscillator0 { compatible = "fixed-clock"; #clock-cells = <0>; @@ -530,8 +539,7 @@ timer: timer@10008000 { "mediatek,mt6577-timer"; reg = <0 0x10008000 0 0x1000>; interrupts = ; - clocks = <&infracfg CLK_INFRA_CLK_13M>, - <&topckgen CLK_TOP_RTC_SEL>; + clocks = <&clk13m>; }; pwrap: pwrap@1000d000 { -- 2.43.0