Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp227799rwb; Thu, 1 Dec 2022 01:14:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf5FpN82rO2gl1ylrkjsMkIeP/83M+Y8/2lC3iN11gdP97N17075kLTJ+5J0uBVmNs327vTq X-Received: by 2002:a63:5263:0:b0:439:8dd3:c3c2 with SMTP id s35-20020a635263000000b004398dd3c3c2mr39042372pgl.481.1669886042529; Thu, 01 Dec 2022 01:14:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669886042; cv=none; d=google.com; s=arc-20160816; b=lg/ZmsFOTwcdXHRH2mrBkfzIPiKHqBK41jULB966GKPlO71zE4uJhEMT+XYoUnBGtP ST2LR3AP2yOxkmHjgcN0lsMEPFUQ1uzBDbc9RS/0ryS4flKLalBwc1+0hGLqQzJqr7Ec 5vcTnahQyu01vShf6CpzgbsF+Q7McqBbkldYHbzv2U4Pzvzf74YCz7X5IWLu/L6nCByx +n6DxlwRTbUe//kC4bqhClslD5sutTyXhKFQCBmkImYtA8MfbitfiZe2kOgrNt0c8pox OuoxSlKAsimAQID11FgYkU81jVkyjrArFDsWNtR0+KCP2ZziEqUqbtHQBO5oC5Da5UC1 y3sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/sbFnIzF7qvR5A534InqCHDBcQlt3cOWkJpUNrDM5kY=; b=qxgZt4NofSB5m7cOFM9G1K5NqjZt+QFmPzjtLrpKtxnKzr/p1ZQj75ieAHjUu5+34Y 89OGIUUL3jgqAkchkKeO9GaTdhX6ZoPCucT8xhhjh+FPj9rttOykaCqTf76GGQNTcnPh 9ioyIkpOCRBpldWXBLnll+CJ4ANbXHW3yp+U9TnVMiCwLa2GVkSI8DXhzC5zQP1X7YTr h/3n4qh+lD9bW/KS+5O+tDoi4EaznnC0lWY8Ndqul2vT7S5SX8qcy7vCi/IPB6I0wvSK zKqCEH9294afo05LGEKBVkoVtr9rJmvJRGN+ayh9xP9XXl4JLh2RVv1ijcghNI8iKYS5 00TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XDENRWAC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c203-20020a621cd4000000b0052f80d1a588si4222617pfc.44.2022.12.01.01.13.51; Thu, 01 Dec 2022 01:14:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XDENRWAC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229759AbiLAImn (ORCPT + 82 others); Thu, 1 Dec 2022 03:42:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbiLAImj (ORCPT ); Thu, 1 Dec 2022 03:42:39 -0500 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280F260C8 for ; Thu, 1 Dec 2022 00:42:37 -0800 (PST) Received: by mail-pg1-x533.google.com with SMTP id f9so1068138pgf.7 for ; Thu, 01 Dec 2022 00:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=/sbFnIzF7qvR5A534InqCHDBcQlt3cOWkJpUNrDM5kY=; b=XDENRWACJueRJJLfr0sZFDJNEVniluetT+EiqOGJ2elV26Aly+mIXeq2OITr5R9kxX axPog3rAomaLwvpSkndt+RwSLx2DEPNBuTXQRA38Q0TNG0wjPk9RLElkHAwIgUPgZ+ad hJxEa3TL9a97p3SZ8flTXNyyFpZ+zkV7xN/Tc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/sbFnIzF7qvR5A534InqCHDBcQlt3cOWkJpUNrDM5kY=; b=sDcJNb+NkVdl9Fdhrn1pVKGa0UP3GyM5JY8jUuGfuPUiGKWrc2JkQ1jG9NRcYTcDha qMt6XuXFCdmX5X+XPg9c3pQ4zuzw9PfdkMSuKAKom78vT//5JWEf6ObdkZsf91pC6pw/ BdTYiG/kRxQwE3SR3Yp6gxT5jc13WwtDrum/6roqdM7ZoFr+WW6g2bMv3ZUQQaXexXrP HZ8spI+CTVBw4Hnrh80Z9R/ych8GpdZ4r6pfMiXOjxEVXqa/dMGTZiMNfXmI6FyWGenW 9jHKMMK90Y2hwKY9YpC0h5977H5MMgVuDTIXIfc1yNa8mGeuVo35SQdweEdEpEp7q/K8 Pu0A== X-Gm-Message-State: ANoB5plBOHkrGDtpCTSMB2MoGGCVPpsU45hTq6lWtfBwGpi4XyIGKwTz 2PsDS5w8284Sw4b7OPU038XrGg== X-Received: by 2002:a63:f962:0:b0:477:1bb8:bbf4 with SMTP id q34-20020a63f962000000b004771bb8bbf4mr40359999pgk.19.1669884156715; Thu, 01 Dec 2022 00:42:36 -0800 (PST) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:2416:fa4e:4eeb:fcde]) by smtp.gmail.com with ESMTPSA id j5-20020a170902690500b001708c4ebbaesm2932293plk.309.2022.12.01.00.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 00:42:36 -0800 (PST) From: Chen-Yu Tsai To: Matthias Brugger Cc: Chen-Yu Tsai , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= Subject: [PATCH 1/4] arm64: dts: mediatek: mt8183: Fix systimer 13 MHz clock description Date: Thu, 1 Dec 2022 16:42:26 +0800 Message-Id: <20221201084229.3464449-2-wenst@chromium.org> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog In-Reply-To: <20221201084229.3464449-1-wenst@chromium.org> References: <20221201084229.3464449-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The systimer block derives its 13 MHz clock by dividing the main 26 MHz oscillator clock by 2 internally, not through the TOPCKGEN clock controller. On the MT8183 this divider is set either by power-on-reset or by the bootloader. The bootloader may then make the divider unconfigurable to, but can be read out by, the operating system. Making the systimer block take the 26 MHz clock directly requires changing the implementations. As an ABI compatible fix, change the input clock of the systimer block a fixed factor divide-by-2 clock that takes the 26 MHz oscillator as its input. Fixes: 5bc8e2875ffb ("arm64: dts: mt8183: add systimer0 device node") Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 19ff1babc359..0cbbaebe1213 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -585,6 +585,15 @@ psci { method = "smc"; }; + 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: oscillator { compatible = "fixed-clock"; #clock-cells = <0>; @@ -968,8 +977,7 @@ systimer: timer@10017000 { "mediatek,mt6765-timer"; reg = <0 0x10017000 0 0x1000>; interrupts = ; - clocks = <&topckgen CLK_TOP_CLK13M>; - clock-names = "clk13m"; + clocks = <&clk13m>; }; iommu: iommu@10205000 { -- 2.38.1.584.g0f3c55d4c2-goog