Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2989853rwb; Fri, 20 Jan 2023 09:44:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXs8rIxEofruWSTWZuKIpUxpzqbx0WNXcJKkR5Jl6fN8txyigLQafRns6bFwH+e9pEOHJZ/l X-Received: by 2002:a17:902:b082:b0:193:38ce:7bb8 with SMTP id p2-20020a170902b08200b0019338ce7bb8mr14361556plr.37.1674236689638; Fri, 20 Jan 2023 09:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674236689; cv=none; d=google.com; s=arc-20160816; b=QTWvBGee3Bx5RqjcnEFK6kFfifbd5AxuRXS2VblDEOuXIKU2IgmXVMrrQwiB1Mgky/ Q+5Ai3639iMsMoh175twwsPVjcKeAjOfhCCB4wEGdKOBu95rx6fvn3qVWS5EQ4pWtOs/ ICMz2waqpabnrYOgIO9G7IJf5JTMWTU7JtNSPQIZjccboQQNA7VaK+4dnWau2krXH6E/ vKIUwcdzGspikF2BNktFjc60UOCjHwKttpqVAG3fer2GZS4CFH6vS1FZzlt4XokcCQ1N C8kHubJRZ4SUrLnUlPVK0oI/THbVQcefHz6Cyn2/Vh5aMFtvAKLZZq+ZsHbGxC4wOm2a qFDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=JrmQ9YByHItWBueH2+ttxwSuumw74wejKeuUDbbBJuc=; b=kgHmuSMV4RWmz+pzTogcAEy6BzfC1atvRRXUOhkXZXS6gEUEzmgarHtkVaTeB5fg8l JwnzcZw0K1AgrIbGXDPY1nOH6jHdqed/ac3CkWj+D0GVSQPk71DNNzl8oNtduN9n0wBl Rzag44SujAITEYjwBvZ5UvpE8HuKLlR/bLw4RWxhk8OrUpnk9wjjwyJtEFbkAdndT0bO +OyCcECk7eLzRlAfcZFOVVjgbgDkjNPwPEHc6nM1RFvau5nU4N8oQGfKFPgxqEwDQ5r0 KH4HONOWvHbg68qtWabo4cUZvrfLV7WQyNUe5me5piMlL8QKB3XI9s0Dqt0yI6TjH/R+ BUqw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a170902ed4300b001945b3a1db5si25784338plb.153.2023.01.20.09.44.42; Fri, 20 Jan 2023 09:44:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbjATRXu (ORCPT + 50 others); Fri, 20 Jan 2023 12:23:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbjATRXt (ORCPT ); Fri, 20 Jan 2023 12:23:49 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38E9DC13CB; Fri, 20 Jan 2023 09:23:27 -0800 (PST) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pIv6o-00054u-0o; Fri, 20 Jan 2023 18:23:22 +0100 Date: Fri, 20 Jan 2023 17:23:12 +0000 From: Daniel Golle To: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Chen-Yu Tsai , Miles Chen , Edward-JW Yang , Johnson Wang , Fabien Parent , Chun-Jie Chen , Sam Shih , Jianhui Zhao Subject: [PATCH v3 0/3] add support for clocks on MT7981 SoC Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 MediaTek MT7981 SoC is quite similar to its big sibling, the MT7986. Hence most drivers can be reused and not much is missing the get also this SoC working on mainline Linux. Start with a cleaned-up version of the clock drivers, based on what can also be found in MediaTek's SDK[1]. Upon request of AngeloGioacchino Del Regno this series has been rebased and adapted to be applied on top of the pending series "MediaTek clocks cleanups and improvements"[2] The complete tree used for testing (with still some to-be-cleaned-up changes, esp. for the Ethernet driver) can be found on Github[3]. [1]: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/refs/heads/master/target/linux/mediatek/files-5.4/drivers/clk/mediatek/clk-mt7981.c [2]: https://patchwork.kernel.org/project/linux-clk/list/?series=714057 [3]: https://github.com/dangowrt/linux Changes since v2: * rebase on top of next-20230120 with v4 of AngeloGioacchino's series[2] * fix titles of dt-bindings commits (this time for real) * convert clk-mt7981-infracfg to use mtk_clk_simple_probe * make use of PLL_AO flag in clk-mt7981-apmixed * convert clk-mt7981-ethsys into platform driver, also using the generic probe function, allow building as module Changes since v1: * rebase and adapt on top of [2] * split-off addition of dt-bindings header, fix filename * changed commit title as requested Daniel Golle (3): dt-bindings: clock: Add apmixedsys/topckgen compatibles for MT7981 dt-bindings: clock: mediatek: add mt7981 clock IDs clk: mediatek: add MT7981 clock support .../bindings/clock/mediatek,apmixedsys.yaml | 1 + .../bindings/clock/mediatek,topckgen.yaml | 1 + drivers/clk/mediatek/Kconfig | 17 + drivers/clk/mediatek/Makefile | 4 + drivers/clk/mediatek/clk-mt7981-apmixed.c | 102 +++++ drivers/clk/mediatek/clk-mt7981-eth.c | 117 +++++ drivers/clk/mediatek/clk-mt7981-infracfg.c | 207 +++++++++ drivers/clk/mediatek/clk-mt7981-topckgen.c | 422 ++++++++++++++++++ .../dt-bindings/clock/mediatek,mt7981-clk.h | 215 +++++++++ 9 files changed, 1086 insertions(+) create mode 100644 drivers/clk/mediatek/clk-mt7981-apmixed.c create mode 100644 drivers/clk/mediatek/clk-mt7981-eth.c create mode 100644 drivers/clk/mediatek/clk-mt7981-infracfg.c create mode 100644 drivers/clk/mediatek/clk-mt7981-topckgen.c create mode 100644 include/dt-bindings/clock/mediatek,mt7981-clk.h -- 2.39.1