From patchwork Thu Dec 1 08:42:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 13061050 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 5CE69C4321E for ; Thu, 1 Dec 2022 08:43:55 +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=HD0S/AyK60gb6zJSCXzweJ1Zvgq+LqqMoCTIwlSb1x0=; b=mCLGZUrQ9lz+k+ Q8ZYL8+F6ZWHnZFQQL1+e8YoGpsyLpuxeWREa8MZGaH5ojCEASx30GgG64imSgOERpmW8IaxklgTO 5WmYNq67OKzJltUtrQD8HLzcfEV5DZjq70exQJXeIb7YALim8s2sWyCz5yXzwluQRgjJyN6Cl+3Tn gLZ0bNpQgQwA27BPiQ3VCCBMQDhTmg2acCDSTWOwzGU5G2V7pnH0aB349NpEJrc0FXqjZX/MFCyJ1 2Cunq8kMcJpP1bY9RWTiZ8cDeJ65dAdx4Fm5NUYWNgomz1vDqJmZOAMn+vIdC0xrSsKRsDzQ6ksLo 2evVwYZR9bucqCYUNSbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0f9Y-005yZv-4i; Thu, 01 Dec 2022 08:42:44 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0f9S-005yTn-Hk for linux-arm-kernel@lists.infradead.org; Thu, 01 Dec 2022 08:42:40 +0000 Received: by mail-pf1-x42f.google.com with SMTP id 130so1220184pfu.8 for ; Thu, 01 Dec 2022 00:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=wUAbzcFVK3ZVITG+2l0a+xKU9wkLH90MaXKWziyaZMU=; b=XMafgRnPXr3IThGMY0Kq7ugDvt8kIojuxnOikwBHoRWG3AOjnaOxKgo5j78aV2lGUv VU0PdkmKb+AjhopRlrKe19lR1pWSDWbhQxX9n1lDhc6Ym3hFbmkP7L7fB/nFGtRyi5e+ r3gOgaH78vSTqZxhRBqIEepFi6tiNXg3Bi2vM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wUAbzcFVK3ZVITG+2l0a+xKU9wkLH90MaXKWziyaZMU=; b=uDLrBRYFuyxB08ShtsiuPsThj5fKpsAQtPkLO/T4nANG0hVUn7NHWIDBxinSzLt4uS Kzcyg78J/NHAhrP33DSlgFql9+nrGvaupVCfu0r4TNLmTYv67ebNVt0THztj71EJkxNR v9VXmUkfWD1/ol3spHYmWhPsToM6B6EJUBM/DrPvowKONN4EdOECkZNfjZ92sMb2V8Qa BE0eJVHKTYugXB3rrqdb6ST9J7ovG7dpKfXTGac7cHl7fDdAUF0DD1iDiuaSWSAflibY FoKFWV1c5Ci6G4upQjg9uNYa4U2+ueIOHzeLNbq2yU9kVhxN3MB3Kcum8bMKP3zZ636v glSA== X-Gm-Message-State: ANoB5pk8rbWI8Iy7Am/96UeCJqVFLxyW5Q/NBJQX/do8b6AFqNzN+zlD gZ51/NT0GTJAvDUs9RspTp95qw== X-Google-Smtp-Source: AA0mqf4DVjDswN2LkRCBiGdapBmzeJV1WAJKCUf6aSfstFW/XOkPpCzHjNsjqlwZB823ZPCU2MWwIA== X-Received: by 2002:a63:6f4b:0:b0:470:5619:4d7d with SMTP id k72-20020a636f4b000000b0047056194d7dmr57777194pgc.301.1669884154448; Thu, 01 Dec 2022 00:42:34 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 00:42:34 -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_F_=2E_R_=2E_A_=2E_Prado?= Subject: [PATCH 0/4] arm64: dts: mediatek: Fix systimer clock description Date: Thu, 1 Dec 2022 16:42:25 +0800 Message-Id: <20221201084229.3464449-1-wenst@chromium.org> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221201_004238_641568_32469B9D X-CRM114-Status: GOOD ( 12.95 ) 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 Hi, This series fixes the clock description for the systimer block. The systimer is fed by the main 26 MHz oscillator, and internally divides the clock, normally by 2. However this ended up being modeled in various incorrect ways, such as the clock divider being in the TOPCKGEN block, or as a standalone 13 MHz oscillator. This series fixes the description of the systimer clock input in an ABI compatible way, i.e. the clock rate of the input clock remains the same at 13 MHz. The clock is now modeled as a divide-by-2 fixed factor clock being fed by the main oscillator. An added benefit is that in Linux the systimer no longer requires the main SoC clk driver to do an early init dance. Please have a look. The next step would be to fix up the systimer driver in a backward compatible way and have it read the divider value from hardware. Regards ChenYu Chen-Yu Tsai (4): arm64: dts: mediatek: mt8183: Fix systimer 13 MHz clock description arm64: dts: mediatek: mt8192: Fix systimer 13 MHz clock description arm64: dts: mediatek: mt8195: Fix systimer 13 MHz clock description arm64: dts: mediatek: mt8186: Fix systimer 13 MHz clock description arch/arm64/boot/dts/mediatek/mt8183.dtsi | 12 ++++++++++-- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 8 +++++--- arch/arm64/boot/dts/mediatek/mt8192.dtsi | 12 ++++++++++-- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 11 ++++++++++- 4 files changed, 35 insertions(+), 8 deletions(-)