From: Peng Fan <peng.fan@oss.nxp.com>
To: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 5/5] clk: samsung: introduce exynos8890 clock driver
Date: Mon, 15 Sep 2025 19:44:09 +0800 [thread overview]
Message-ID: <20250915114409.GA14804@nxa18884-linux.ap.freescale.net> (raw)
In-Reply-To: <d23885a5-6d42-443a-bf19-eb6747e8ec47@gmail.com>
On Mon, Sep 15, 2025 at 11:59:47AM +0300, Ivaylo Ivanov wrote:
>On 9/15/25 10:49, Peng Fan wrote:
>> On Sun, Sep 14, 2025 at 03:21:16PM +0300, Ivaylo Ivanov wrote:
>>> Introduce a clocks management driver for exynos8890, providing clocks
>>> for the peripherals of that SoC.
>>>
>>> As exynos8890 is the first SoC to have HWACG, it differs a bit from the
>> Hardware Auto Clock Gating(HWACG), if I understand correctly.
>>
>>> newer SoCs. Q-channel and Q-state bits are separate registers, unlike
>>> the CLK_CON_GAT_* ones that feature HWACG bits in the same register
>>> that controls manual gating. Hence, don't use the clk-exynos-arm64
>>> helper, but implement logic that enforces manual gating according to
>>> how HWACG is implemented here.
>>>
>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
>>> ---
>>> drivers/clk/samsung/Makefile | 1 +
>>> drivers/clk/samsung/clk-exynos8890.c | 8695 ++++++++++++++++++++++++++
>>> 2 files changed, 8696 insertions(+)
>>> create mode 100644 drivers/clk/samsung/clk-exynos8890.c
>>>
>>> diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
>>> index b77fe288e..982dc7c64 100644
>>> --- a/drivers/clk/samsung/Makefile
>>> +++ b/drivers/clk/samsung/Makefile
>>> @@ -22,6 +22,7 @@ obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7.o
>>> obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7870.o
>>> obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7885.o
>>> obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos850.o
>>> +obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos8890.o
>>> obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos8895.o
>>> obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos990.o
>>> obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov9.o
>>> diff --git a/drivers/clk/samsung/clk-exynos8890.c b/drivers/clk/samsung/clk-exynos8890.c
>>> new file mode 100644
>>> index 000000000..670587bae
>>> --- /dev/null
>>> +++ b/drivers/clk/samsung/clk-exynos8890.c
>>> @@ -0,0 +1,8695 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only
>>> +/*
>>> + * Copyright (C) 2025 Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
>>> + * Author: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
>>> + *
>>> + * Common Clock Framework support for Exynos8890 SoC.
>>> + */
>>> +
>>> +#include <linux/clk-provider.h>
>>> +#include <linux/mod_devicetable.h>
>>> +#include <linux/of_address.h>
>>> +#include <linux/of.h>
>>> +#include <linux/platform_device.h>
>>> +
>>> +#include <dt-bindings/clock/samsung,exynos8890-cmu.h>
>>> +
>>> +#include "clk.h"
>>> +
>>> +/* NOTE: Must be equal to the last clock ID increased by one */
>>> +#define TOP_NR_CLK (CLK_GOUT_TOP_SCLK_PROMISE_DISP + 1)
>>> +#define PERIS_NR_CLK (CLK_GOUT_PERIS_SCLK_PROMISE_PERIS + 1)
>>> +#define APOLLO_NR_CLK (CLK_GOUT_APOLLO_SCLK_PROMISE_APOLLO + 1)
>>> +#define AUD_NR_CLK (CLK_GOUT_AUD_SCLK_I2S_BCLK + 1)
>>> +#define BUS0_NR_CLK (CLK_GOUT_BUS0_ACLK_TREX_P_BUS0 + 1)
>>> +#define BUS1_NR_CLK (CLK_GOUT_BUS1_ACLK_TREX_P_BUS1 + 1)
>>> +#define CCORE_NR_CLK (CLK_GOUT_CCORE_SCLK_PROMISE + 1)
>>> +#define DISP0_NR_CLK (CLK_GOUT_DISP0_OSCCLK_DP_I_CLK_24M + 1)
>>> +#define DISP1_NR_CLK (CLK_GOUT_DISP1_SCLK_PROMISE_DISP1 + 1)
>>> +#define FSYS0_NR_CLK (CLK_GOUT_FSYS0_SCLK_USBHOST20_REF_CLK + 1)
>>> +#define FSYS1_NR_CLK (CLK_GOUT_FSYS1_SCLK_PROMISE_FSYS1 + 1)
>>> +#define G3D_NR_CLK (CLK_GOUT_G3D_SCLK_ASYNCAXI_G3D + 1)
>>> +#define MIF0_NR_CLK (CLK_GOUT_MIF0_RCLK_DREX + 1)
>>> +#define MIF1_NR_CLK (CLK_GOUT_MIF1_RCLK_DREX + 1)
>>> +#define MIF2_NR_CLK (CLK_GOUT_MIF2_RCLK_DREX + 1)
>>> +#define MIF3_NR_CLK (CLK_GOUT_MIF3_RCLK_DREX + 1)
>>> +#define MNGS_NR_CLK (CLK_GOUT_MNGS_SCLK_PROMISE0_MNGS + 1)
>>> +#define PERIC0_NR_CLK (CLK_GOUT_PERIC0_SCLK_PWM + 1)
>>> +#define PERIC1_NR_CLK (CLK_GOUT_PERIC1_SCLK_UART5 + 1)
>>> +
>>> +/*
>>> + * As exynos8890 first introduced hwacg, cmu registers are mapped similarly
>>> + * to exynos7, with the exception of the new q-state and q-ch registers that
>>> + * can set the behavior of automatic gates.
>>> + */
>>> +
>>> +/* decoded magic number from downstream */
>>> +#define QCH_EN_MASK BIT(0)
>>> +#define QCH_MASK (GENMASK(19, 16) | BIT(12))
>>> +#define QCH_DIS (QCH_MASK | FIELD_PREP(QCH_EN_MASK, 0))
>> Nit: align code.
>
>Aligned in my editor, patch files offset each line with a single symbol
>so formatting gets broken...
seems something broken in my mutt. Sorry for false alarm.
>> will not able to support GKI.
>>
>> It would be better to update to use platform drivers.
>
>Same as what Krzysztof said, design choice accross all samsung clock drivers.
Sure. No problem.
Regards
Peng
>
prev parent reply other threads:[~2025-09-15 10:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-14 12:21 [PATCH v1 0/5] clk: samsung: introduce exynos8890 clock driver Ivaylo Ivanov
2025-09-14 12:21 ` [PATCH v1 1/5] dt-bindings: clock: add exynos8890 SoC Ivaylo Ivanov
2025-09-14 12:21 ` [PATCH v1 2/5] clk: samsung: clk-pll: Add support for pll_141xx Ivaylo Ivanov
2025-09-15 7:24 ` Peng Fan
2025-09-14 12:21 ` [PATCH v1 3/5] clk: samsung: clk-pll: Add support for pll_1419x Ivaylo Ivanov
2025-09-15 7:26 ` Peng Fan
2025-09-14 12:21 ` [PATCH v1 4/5] clk: samsung: clk-pll: Add support for pll_1431x Ivaylo Ivanov
2025-09-15 7:27 ` Peng Fan
2025-09-14 12:21 ` [PATCH v1 5/5] clk: samsung: introduce exynos8890 clock driver Ivaylo Ivanov
2025-09-14 14:16 ` kernel test robot
2025-09-15 7:49 ` Peng Fan
2025-09-15 7:16 ` Krzysztof Kozlowski
2025-09-15 11:30 ` Peng Fan
2025-09-17 2:26 ` Krzysztof Kozlowski
2025-09-15 8:59 ` Ivaylo Ivanov
2025-09-15 11:44 ` Peng Fan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250915114409.GA14804@nxa18884-linux.ap.freescale.net \
--to=peng.fan@oss.nxp.com \
--cc=alim.akhtar@samsung.com \
--cc=conor+dt@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=ivo.ivanov.ivanov1@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox