From patchwork Thu Jan 19 14:11:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 4239 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp350309wrn; Thu, 19 Jan 2023 06:14:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXtN9Z4joT1NMW45w5aesQfb0PRXvJ/YYIPCNKIpNGTb8fBrQNuXSEAdxvUCdpEbSpXMo56I X-Received: by 2002:a17:906:7e10:b0:846:cdd9:d23 with SMTP id e16-20020a1709067e1000b00846cdd90d23mr12234345ejr.19.1674137671443; Thu, 19 Jan 2023 06:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674137671; cv=none; d=google.com; s=arc-20160816; b=GXd0zq1xEJKv/1F9ReyV5Nfyt51J2Ard2c2DKvWYZ/x8Q5K1dBXLvXnvwsgorYK29H Dv4DrVimU6M6QAyz2VcURMEA0V1qJz/6T6zhx9XNPN5kETNN/E6m7LQs7MWNZsolUKGY NHnEzMX5v6vL7mVW5uqpvwz+qp9YevapQX2J9/EUQFAU+bSGKJyw8AII5yK3onHcsvs3 AdM+foqLW17ZVQnLxX1gfdSf4S/H1sj8IJ5d2mAh24+bCJ+irqdIPlwlks7XIKavigYJ VvrXzwTuHpEvfe5dgj240O87XWfEZTk4W9KFAQT/6GndZPiZwvPgFlOE57dEJyslONr3 JDQA== 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=3uvQ7g4oFemSXhTcUKVqSmQntN88dTb2qgYG6qxER7U=; b=ka+b86W4or7fY5w7qi16MtnZkc1mrsxtE1pD4kXOPkeUycSBa91olgLn3c4lVkGKzW OmKd3JVpgnRkzPBsv7nowB5AMIhhDH/csAWo8Y05Y92DDAlceASLbGoiONch41uAkLvi CR64bnlPSyDPxXgiBX1Us4b4Pp9NIDF827q5LUSmSOdi1cgoSFhX7JpGGFJggMvOUK8N Z1UbMLTJzz/V3jPplBVN1nhh2VeFbcHXiZSaTm9fWhkCN4gPgRKvC2shvP5I2ChEb6nC BlKmuOJeOmd53h8fAOYIszyDNlG13EBRv1HS7439/BLVH0saLr7BqhUnOXy2XQkDxiZF uvwQ== 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 y20-20020a056402441400b0048ea97eec14si53072258eda.609.2023.01.19.06.13.52; Thu, 19 Jan 2023 06:14:31 -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 S231631AbjASONG (ORCPT + 99 others); Thu, 19 Jan 2023 09:13:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231573AbjASOMg (ORCPT ); Thu, 19 Jan 2023 09:12:36 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F251E4ED12; Thu, 19 Jan 2023 06:11:15 -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 1pIVdE-0008Lb-1h; Thu, 19 Jan 2023 15:11:08 +0100 Date: Thu, 19 Jan 2023 14:11:01 +0000 From: Daniel Golle To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , 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 Cc: Chen-Yu Tsai , Miles Chen , Edward-JW Yang , Johnson Wang , Fabien Parent , Chun-Jie Chen , Sam Shih , Jianhui Zhao Subject: [PATCH 0/2] 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?1755460583115738563?= 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]. [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 Daniel Golle (2): dt-bindings: clock: add some compatible strings for MT7981 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 | 431 ++++++++++++++++++ include/dt-bindings/clock/mt7981-clk.h | 215 +++++++++ 9 files changed, 1146 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/mt7981-clk.h base-commit: aa5c49149a823599764e6953229b028e4bf6e9cc Acked-by: Rob Herring