From patchwork Fri Jan 20 01:24:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 4279 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp640732wrn; Thu, 19 Jan 2023 17:31:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXutn+kTfKOVfVoJ44CZ5IYUSAubk8BE6ZmJ00HIPIqj5ybDLP+DGn8G2PnM5ZuZcfsazAcS X-Received: by 2002:a17:902:f155:b0:194:b982:e075 with SMTP id d21-20020a170902f15500b00194b982e075mr7435736plb.12.1674178272592; Thu, 19 Jan 2023 17:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674178272; cv=none; d=google.com; s=arc-20160816; b=oHUpLRozNqiYlg3iQd8OLG4AejDgjjiLNV5IB/vrUnl654DFnGVg3ybzWa8dD48mRs GfLWi/w4U9i1IhX4cLqXm36jM6zSAANDxOisjtO3bHm2VJe8DJ0sHObuXHaLM46fUesS 6zV2wRAinpcv60/LrCuKd20ozqFP9lbDo6Ix0F4Z9LewIF6ZGVA82T7BmhFp1a8doLQD I4Tc8y4ac67nxRbpaChTfe4EKb8VYS3SjRQRnBJJc5wSxsdm5VUO5C6VOGooOHQodSHf nyRafpb3MSExKvtLnmazqEW9pbDxJA1ioLEIsoeaRACXnQiK55FTzdPKSBegG7POfzil umRg== 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=xamGaGtvB9HqMjf06LUEihHT8uFAAGyusdxNzjapV4w=; b=EAanAxbtO827HskablHqIur7V5Wim1VOuTfjeay+pdJq3Qo2skUojeDx9gQtZgG6RT y5W+UQge/W3vWEZ3an+8n8uMyMt0K8WLB6Q5rrHXeQa29H95ggr2G098LVzmwoniw5Az VUX9gRq2hpmg4rVF0G7UqZ32Ayzld8HIrcSbWQWLybQGTiY/pRbPoVpoWzHpjFAV94U4 jGSfu+cvhbmMkzo1m6UtRvwLYNvoYOkpc7kHSEcxk4z0/vYdk965jlvtOiEN0YtIVBb3 KoRNcATaAxdos39hT1P8e0Rxy+zuE9BvY+D87Gw9yEeMPrRwpwhW9HZThCxpExLlNbDW 9XoA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a17090332cb00b00189758e2b8bsi15172518plr.618.2023.01.19.17.31.00; Thu, 19 Jan 2023 17:31:12 -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 S229807AbjATBZA (ORCPT + 99 others); Thu, 19 Jan 2023 20:25:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjATBY7 (ORCPT ); Thu, 19 Jan 2023 20:24:59 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51926A2959; Thu, 19 Jan 2023 17:24:56 -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 1pIg98-0005vY-1m; Fri, 20 Jan 2023 02:24:48 +0100 Date: Fri, 20 Jan 2023 01:24:36 +0000 From: Daniel Golle To: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-armkernel@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 0/3 v2] add support for clocks on MT7981 SoC Message-ID: MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755460583115738563?= X-GMAIL-MSGID: =?utf-8?q?1755503156144351673?= 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] Changes since v1: * rebase and adapt on top of [2] * split-off addition of dt-bindings header, fix filename * changed commit title as requested [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-mediatek/list/?series=711734 Daniel Golle (3): dt-bindings: clk: Add apmixedsys/topckgen compatibles for MT7981 dt-bindings: clk: 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 | 103 +++++ drivers/clk/mediatek/clk-mt7981-eth.c | 138 ++++++ drivers/clk/mediatek/clk-mt7981-infracfg.c | 236 ++++++++++ drivers/clk/mediatek/clk-mt7981-topckgen.c | 423 ++++++++++++++++++ .../dt-bindings/clock/mediatek,mt7981-clk.h | 215 +++++++++ 9 files changed, 1138 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