From: Stephen Boyd <sboyd@kernel.org>
To: Yu-Chun Lin <eleanor.lin@realtek.com>,
afaerber@suse.com, conor+dt@kernel.org, cylee12@realtek.com,
jyanchou@realtek.com, krzk+dt@kernel.org,
mturquette@baylibre.com, p.zabel@pengutronix.de, robh@kernel.org
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-realtek-soc@lists.infradead.org, james.tai@realtek.com,
cy.huang@realtek.com, stanley_chang@realtek.com,
eleanor.lin@realtek.com
Subject: Re: [PATCH v5 08/10] clk: realtek: Add support for MMC-tuned PLL clocks
Date: Tue, 24 Mar 2026 18:54:24 -0700 [thread overview]
Message-ID: <177440366488.5403.14385693004290004608@localhost.localdomain> (raw)
In-Reply-To: <20260324025332.3416977-9-eleanor.lin@realtek.com>
Quoting Yu-Chun Lin (2026-03-23 19:53:29)
> diff --git a/drivers/clk/realtek/clk-pll-mmc.c b/drivers/clk/realtek/clk-pll-mmc.c
> new file mode 100644
> index 000000000000..017663738c1f
> --- /dev/null
> +++ b/drivers/clk/realtek/clk-pll-mmc.c
> @@ -0,0 +1,399 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2021 Realtek Semiconductor Corporation
> + * Author: Cheng-Yu Lee <cylee12@realtek.com>
> + */
> +
> +#include "clk-pll.h"
Include what you use in this C file, not just this header file. That
makes it simpler to see what is used without following include trails.
> +
> +#define PLL_EMMC1_OFFSET 0x0
> +#define PLL_EMMC2_OFFSET 0x4
> +#define PLL_EMMC3_OFFSET 0x8
> +#define PLL_EMMC4_OFFSET 0xc
> +#define PLL_SSC_DIG_EMMC1_OFFSET 0x0
> +#define PLL_SSC_DIG_EMMC3_OFFSET 0xc
> +#define PLL_SSC_DIG_EMMC4_OFFSET 0x10
> +
> +#define PLL_MMC_SSC_DIV_N_VAL 0x1b
> +
> +#define PLL_PHRT0_MASK BIT(1)
> +#define PLL_PHSEL_MASK GENMASK(4, 0)
> +#define PLL_SSCPLL_RS_MASK GENMASK(12, 10)
> +#define PLL_SSCPLL_ICP_MASK GENMASK(9, 5)
> +#define PLL_SSC_DIV_EXT_F_MASK GENMASK(25, 13)
> +#define PLL_PI_IBSELH_MASK GENMASK(28, 27)
> +#define PLL_SSC_DIV_N_MASK GENMASK(23, 16)
> +#define PLL_NCODE_SSC_EMMC_MASK GENMASK(20, 13)
> +#define PLL_FCODE_SSC_EMMC_MASK GENMASK(12, 0)
> +#define PLL_GRAN_EST_EM_MC_MASK GENMASK(20, 0)
> +#define PLL_EN_SSC_EMMC_MASK BIT(0)
> +#define PLL_FLAG_INITAL_EMMC_MASK BIT(1)
[...]
> diff --git a/drivers/clk/realtek/clk-pll.h b/drivers/clk/realtek/clk-pll.h
> index 2d27a44a270c..9cf219871218 100644
> --- a/drivers/clk/realtek/clk-pll.h
> +++ b/drivers/clk/realtek/clk-pll.h
> @@ -44,4 +44,25 @@ static inline struct clk_pll *to_clk_pll(struct clk_hw *hw)
> extern const struct clk_ops rtk_clk_pll_ops;
> extern const struct clk_ops rtk_clk_pll_ro_ops;
>
> +struct clk_pll_mmc {
> + struct clk_regmap clkr;
> + int pll_ofs;
> + int ssc_dig_ofs;
These offsets should be unsigned?
> + struct clk_hw phase0_hw;
> + struct clk_hw phase1_hw;
> + u32 set_rate_val_53_97_set_ipc: 1;
bool? Doubt we care about this unless we're packing structs (which we
shouldn't be).
> +};
> +
> +#define __clk_pll_mmc_hw(_ptr) __clk_regmap_hw(&(_ptr)->clkr)
> +
> +static inline struct clk_pll_mmc *to_clk_pll_mmc(struct clk_hw *hw)
> +{
> + struct clk_regmap *clkr = to_clk_regmap(hw);
> +
> + return container_of(clkr, struct clk_pll_mmc, clkr);
> +}
next prev parent reply other threads:[~2026-03-25 2:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 2:53 [PATCH v5 00/10] clk: realtek: Add RTD1625 clock support Yu-Chun Lin
2026-03-24 2:53 ` [PATCH v5 01/10] dt-bindings: clock: Add Realtek RTD1625 Clock & Reset Controller Yu-Chun Lin
2026-03-24 8:47 ` Krzysztof Kozlowski
2026-03-25 1:59 ` Stephen Boyd
2026-03-30 2:48 ` Yu-Chun Lin [林祐君]
2026-03-24 2:53 ` [PATCH v5 02/10] arm64: dts: realtek: Add clock support for RTD1625 Yu-Chun Lin
2026-03-24 2:53 ` [PATCH v5 03/10] reset: Add Realtek basic reset support Yu-Chun Lin
2026-03-25 17:21 ` Philipp Zabel
2026-03-24 2:53 ` [PATCH v5 04/10] clk: realtek: Introduce a common probe() Yu-Chun Lin
2026-03-24 2:53 ` [PATCH v5 05/10] clk: realtek: Add support for phase locked loops (PLLs) Yu-Chun Lin
2026-03-24 2:53 ` [PATCH v5 06/10] clk: realtek: Add support for gate clock Yu-Chun Lin
2026-03-24 2:53 ` [PATCH v5 07/10] clk: realtek: Add support for mux clock Yu-Chun Lin
2026-03-24 2:53 ` [PATCH v5 08/10] clk: realtek: Add support for MMC-tuned PLL clocks Yu-Chun Lin
2026-03-25 1:54 ` Stephen Boyd [this message]
2026-03-30 3:00 ` Yu-Chun Lin [林祐君]
2026-03-24 2:53 ` [PATCH v5 09/10] clk: realtek: Add RTD1625-CRT clock controller driver Yu-Chun Lin
2026-03-24 23:06 ` kernel test robot
2026-03-25 17:24 ` Philipp Zabel
2026-03-24 2:53 ` [PATCH v5 10/10] clk: realtek: Add RTD1625-ISO " Yu-Chun Lin
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=177440366488.5403.14385693004290004608@localhost.localdomain \
--to=sboyd@kernel.org \
--cc=afaerber@suse.com \
--cc=conor+dt@kernel.org \
--cc=cy.huang@realtek.com \
--cc=cylee12@realtek.com \
--cc=devicetree@vger.kernel.org \
--cc=eleanor.lin@realtek.com \
--cc=james.tai@realtek.com \
--cc=jyanchou@realtek.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-realtek-soc@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=stanley_chang@realtek.com \
/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
all inboxes | Powered by JetHome®