[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqJVY3-UneaoUNt6aGa2kU_3EVAwxJfY_mYZPyp=L=Bjtw@mail.gmail.com>
Date: Mon, 11 Dec 2023 11:36:41 -0600
From: Rob Herring <robh+dt@...nel.org>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Sabrina Dubroca <sd@...asysnail.net>,
Jianhui Zhao <zhaojh329@...il.com>,
Chen-Yu Tsai <wenst@...omium.org>,
"Garmin.Chang" <Garmin.Chang@...iatek.com>,
Sam Shih <sam.shih@...iatek.com>,
Markus Schneider-Pargmann <msp@...libre.com>,
Alexandre Mergnat <amergnat@...libre.com>,
Jiasheng Jiang <jiasheng@...as.ac.cn>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Frank Wunderlich <frank-w@...lic-files.de>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Chanwoo Choi <cw00.choi@...sung.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
James Liao <jamesjj.liao@...iatek.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH v4 4/4] clk: mediatek: add drivers for MT7988 SoC
On Sat, Dec 9, 2023 at 3:56 PM Daniel Golle <daniel@...rotopia.org> wrote:
>
> From: Sam Shih <sam.shih@...iatek.com>
>
> Add APMIXED, ETH, INFRACFG and TOPCKGEN clock drivers which are
> typical MediaTek designs.
>
> Also add driver for XFIPLL clock generating the 156.25MHz clock for
> the XFI SerDes. It needs an undocumented software workaround and has
> an unknown internal design.
>
> Signed-off-by: Sam Shih <sam.shih@...iatek.com>
> Signed-off-by: Daniel Golle <daniel@...rotopia.org>
> ---
> v4:
> * make use of existing GATE_MTK_FLAGS macro
> * reformat to max. 100 columns
> * cosmetics
>
> v3: use git --from ...
> v2: no changes
>
>
> drivers/clk/mediatek/Kconfig | 9 +
> drivers/clk/mediatek/Makefile | 5 +
> drivers/clk/mediatek/clk-mt7988-apmixed.c | 102 +++++++
> drivers/clk/mediatek/clk-mt7988-eth.c | 133 +++++++++
> drivers/clk/mediatek/clk-mt7988-infracfg.c | 274 +++++++++++++++++
> drivers/clk/mediatek/clk-mt7988-topckgen.c | 325 +++++++++++++++++++++
> drivers/clk/mediatek/clk-mt7988-xfipll.c | 78 +++++
> 7 files changed, 926 insertions(+)
> create mode 100644 drivers/clk/mediatek/clk-mt7988-apmixed.c
> create mode 100644 drivers/clk/mediatek/clk-mt7988-eth.c
> create mode 100644 drivers/clk/mediatek/clk-mt7988-infracfg.c
> create mode 100644 drivers/clk/mediatek/clk-mt7988-topckgen.c
> create mode 100644 drivers/clk/mediatek/clk-mt7988-xfipll.c
>
> diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
> index 48b42d11111cd..70a005e7e1b18 100644
> --- a/drivers/clk/mediatek/Kconfig
> +++ b/drivers/clk/mediatek/Kconfig
> @@ -423,6 +423,15 @@ config COMMON_CLK_MT7986_ETHSYS
> This driver adds support for clocks for Ethernet and SGMII
> required on MediaTek MT7986 SoC.
>
> +config COMMON_CLK_MT7988
> + tristate "Clock driver for MediaTek MT7988"
> + depends on ARCH_MEDIATEK || COMPILE_TEST
> + select COMMON_CLK_MEDIATEK
> + default ARCH_MEDIATEK
> + help
> + This driver supports MediaTek MT7988 basic clocks and clocks
> + required for various periperals found on this SoC.
> +
> config COMMON_CLK_MT8135
> tristate "Clock driver for MediaTek MT8135"
> depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
> diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
> index dbeaa5b41177d..eeccfa039896f 100644
> --- a/drivers/clk/mediatek/Makefile
> +++ b/drivers/clk/mediatek/Makefile
> @@ -62,6 +62,11 @@ obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-apmixed.o
> obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-topckgen.o
> obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-infracfg.o
> obj-$(CONFIG_COMMON_CLK_MT7986_ETHSYS) += clk-mt7986-eth.o
> +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-apmixed.o
> +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-topckgen.o
> +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-infracfg.o
> +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-eth.o
> +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-xfipll.o
> obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135-apmixedsys.o clk-mt8135.o
> obj-$(CONFIG_COMMON_CLK_MT8167) += clk-mt8167-apmixedsys.o clk-mt8167.o
> obj-$(CONFIG_COMMON_CLK_MT8167_AUDSYS) += clk-mt8167-aud.o
> diff --git a/drivers/clk/mediatek/clk-mt7988-apmixed.c b/drivers/clk/mediatek/clk-mt7988-apmixed.c
> new file mode 100644
> index 0000000000000..02eb6354b01a8
> --- /dev/null
> +++ b/drivers/clk/mediatek/clk-mt7988-apmixed.c
> @@ -0,0 +1,102 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2023 MediaTek Inc.
> + * Author: Sam Shih <sam.shih@...iatek.com>
> + * Author: Xiufeng Li <Xiufeng.Li@...iatek.com>
> + */
> +
> +#include <linux/clk-provider.h>
> +#include <linux/of.h>
> +#include <linux/of_address.h>
> +#include <linux/of_device.h>
You probably don't need these 2 headers and the implicit includes
of_device.h makes are dropped now in linux-next. Please check what you
actually need and make them explicit.
Rob
Powered by blists - more mailing lists