From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B5682638BA for ; Wed, 18 Feb 2026 18:05:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771437955; cv=none; b=TFNvogdjcRpg2zRGccU6CcBV3sWyzUPLIiN5im39c3jx2fRaUQsMpvIi/nVyu0px2O9I8bKzlcRhrtul71BymI/mKBqK/ZQiYnzYjRMbDXnDDpjM/ydQdhPLn+0egEAVTqQlXw9QobEUDMEg73lwKzjNEZfj+DkAWYnXmUzp3F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771437955; c=relaxed/simple; bh=vVN3eI0cG3eJzDGQMowePioEB5QD5fgAY4jEmwKs8Cs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=GGBteqqJhWFfWP8QycG1LA2elZ2moT/ptDqySumbEt1cdU/Dk+/8bk4PyXIMTHbwgfaZ43fgfzR3Fo3XZ/do1aPBt4kkBKr502lOCfPKF17YNPZwgSiQNX7/rCoYibITXK57KYNUaVReeemvybh5A2JDN9fIQPq3OMbTZrBof/c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=IzbDdriN; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="IzbDdriN" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4836e3288cdso1107795e9.0 for ; Wed, 18 Feb 2026 10:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1771437952; x=1772042752; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZXX5Ad6lE4eM3SpWZXXZtn5YXTRNU+kz7ZHFBHa7LgY=; b=IzbDdriNK3y5TBY4beWPuSk0MIgZqCk6dysdFWOE+r40Ukguxq1K+/CrvSXFI5VvYM Uepf8L0Ez0sh9HwtlUpBKvva+/Uu6Qz2lLj5qBN5SGIyVqv5wyQ+vvy3toGqZqc28Xl2 Iwx104xOIgkxKJkhQYR6j9BvpRPt+kFqSMfaiXtg9/ehRDy2RLnSwav9bQFN5cqTnDIy O0jwSl5rvgi1AF7jeANSUXNebpjwGtClq6S9bsMjY+Nc8kvaOh4cuto+azGCBwM1CTIh 56apnuR4V96p2+tSWPg8gK/+GJzkZNlsGs/xGPVK0G9cpusbyVyg7YA8ly27yqJ3n6V+ b7Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771437952; x=1772042752; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZXX5Ad6lE4eM3SpWZXXZtn5YXTRNU+kz7ZHFBHa7LgY=; b=fpJiTTNtMLXR6oOBoJ4MYZ95k9pgXITEympzW/hoqr3zxLVCmQetMWMZOq3Ykn/emW PcLOocU5xTYL7AHP52GXIuYkEoX3QG5AGo8THb5cW+oFcYb3XuJCPznL3x8nq3pULRD5 rkEMU4h5xRxlUW3MHm1mZxy0ZP6NtchGQiTFoPED3/r9/GqcdnKB2CwxnbNsAbSTRv5N oyvnYruedu/cYqgQezmPnE9ZDq5MHSH9N4z2gCWKn/s2lppPnllNgDlTZDTx0aYS4Vau Cf0GIPgUQmK0zyZQiNIq9+8nGdc6RbMBXEUsqtIKuTLYCUUVxM+mh4cP0k3wT5eRU58m mTmw== X-Forwarded-Encrypted: i=1; AJvYcCVGZAQdqSDfU4yHlRDi6hrqvD528iNSIxHcBSTMErvne6/uSk1X3AbO0ghAPQm9YlQw8HwNaheK/B3oUXA=@vger.kernel.org X-Gm-Message-State: AOJu0YyBYb/+7d7nCYwGp8WXR77Onyf7YGZF7eebm45fChG1PVjh92o2 rIA7yXDqDRzglJrk/wiR0RLspSEkI0PVJEsxyl/Ib1xBL+4KMDD8ZoVwiJswW89NldQ= X-Gm-Gg: AZuq6aI5WLN9jJFHTa10ySav+QQ8EFreWLB8j9QoaYJiC6bsYx5NWzM0RIj2KOaVMzi jzBLNR4bAPbhyPm201Z0cvzG7U5v2GEGoHqPyvFBO7nY2IgIeDwQhaGhnq0Gu/C6LVkwRGcl5kI wwrTfED3CKU0WkMrnQBrDarc4D+IgNeJchomXQF0OumeSMd1nNpL34rDPn5Swr9LI8zYDxHqnpV 42i5J24HfI334a8yPWTFigAqcO7efyLfP4Z8TDXLN4d4HqL4hjJb89888NCVQbfu94ZNxl3iFsT bNjGTQXBBYDl5Icp/0vI28khGaFFvwt5/nyTwm5D8PHyQ06erWufjzO8Oeiw1QtSjgs2Nw7Yciy JkdeH2Hn0UheagWPKLqJ9PALYisQQMUSfMPDvx+rFTTD9X59X5I1KBkefXTX63iPdxAqvFXNvGX b8tEEtdyA/tV1gd1VooZzesQ== X-Received: by 2002:a05:600c:3b15:b0:47d:333d:99c with SMTP id 5b1f17b1804b1-48398cc6196mr51541025e9.18.1771437951849; Wed, 18 Feb 2026 10:05:51 -0800 (PST) Received: from localhost ([2a01:e0a:3c5:5fb1:cf71:8cf8:56bb:5790]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-483801ff9b3sm317029295e9.13.2026.02.18.10.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 10:05:51 -0800 (PST) From: Jerome Brunet To: Ronald Claveau Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/7] drivers: clk: meson: Add Amlogic T7 fix pll support In-Reply-To: <20260218101709.35450-1-linux-kernel-dev@aliel.fr> (Ronald Claveau's message of "Wed, 18 Feb 2026 11:17:06 +0100") References: <20260218101709.35450-1-linux-kernel-dev@aliel.fr> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Wed, 18 Feb 2026 19:05:49 +0100 Message-ID: <1j4ine6i6a.fsf@starbuckisacylon.baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On mer. 18 f=C3=A9vr. 2026 at 11:17, Ronald Claveau wrote: > Add PLL for the clock controller of the Amlogic T7 SoC family. > As Krzysztof pointed out, a series like this needs a cover letter to explain what you are trying to acheive overall, and proper threading. The description above is too vague. > Signed-off-by: Ronald Claveau > --- > drivers/clk/meson/t7-pll.c | 257 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 257 insertions(+) > > diff --git a/drivers/clk/meson/t7-pll.c b/drivers/clk/meson/t7-pll.c > index 0a622f45fa36..3dd3aca50b7c 100644 > --- a/drivers/clk/meson/t7-pll.c > +++ b/drivers/clk/meson/t7-pll.c > @@ -71,6 +71,15 @@ > #define MCLK_PLL_CNTL4 0x10 > #define MCLK_PLL_STS 0x14 >=20=20 > +#define FPLL_CTRL0 0x00 > +#define FPLL_CTRL1 0x04 > +#define FPLL_CTRL2 0x08 > +#define FPLL_CTRL3 0x0c > +#define FPLL_CTRL4 0x10 > +#define FPLL_CTRL5 0x14 > +#define FPLL_CTRL6 0x18 > +#define FPLL_STS 0x1c The PLL you are adding is described in the datasheet as the MPLL. FPLL is nowhere to be found. Prefer using names that relate to the documentation. If you must make a name up, you need to have a very good reason and to explain it. Still from the public documentation, this PLL belong in the same device as MPLL0, MPLL1, etc ... BUT, I remember correctly the T7 initial submission, the fixed PLL and fdivs are supposed to be provided through SCMI clocks. Have you checked that ? > + > static const struct pll_mult_range t7_media_pll_mult_range =3D { > .min =3D 125, > .max =3D 250, > @@ -1047,6 +1056,253 @@ static const struct meson_clkc_data t7_mclk_data = =3D { > }, > }; >=20=20 > +static struct clk_regmap t7_fpll_dco =3D { > + .data =3D &(struct meson_clk_pll_data){ > + .en =3D { > + .reg_off =3D FPLL_CTRL0, > + .shift =3D 28, > + .width =3D 1, > + }, > + .m =3D { > + .reg_off =3D FPLL_CTRL0, > + .shift =3D 0, > + .width =3D 8, > + }, > + .n =3D { > + .reg_off =3D FPLL_CTRL0, > + .shift =3D 10, > + .width =3D 5, > + }, > + .frac =3D { > + .reg_off =3D FPLL_CTRL1, > + .shift =3D 0, > + .width =3D 17, > + }, > + .l =3D { > + .reg_off =3D FPLL_CTRL0, > + .shift =3D 31, > + .width =3D 1, > + }, > + .rst =3D { > + .reg_off =3D FPLL_CTRL0, > + .shift =3D 29, > + .width =3D 1, > + }, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fpll_dco", > + .ops =3D &meson_clk_pll_ro_ops, > + .parent_data =3D &(const struct clk_parent_data) { > + .fw_name =3D "xtal", > + }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fpll =3D { > + .data =3D &(struct clk_regmap_div_data){ > + .offset =3D FPLL_CTRL0, > + .shift =3D 16, > + .width =3D 2, > + .flags =3D CLK_DIVIDER_POWER_OF_TWO, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fpll", > + .ops =3D &clk_regmap_divider_ro_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fpll_dco.hw > + }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_fixed_factor t7_fdiv2_div =3D { > + .mult =3D 1, > + .div =3D 2, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv2_div", > + .ops =3D &clk_fixed_factor_ops, > + .parent_hws =3D (const struct clk_hw *[]) { &t7_fpll.hw }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fdiv2 =3D { > + .data =3D &(struct clk_regmap_gate_data){ > + .offset =3D FPLL_CTRL1, > + .bit_idx =3D 24, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv2", > + .ops =3D &clk_regmap_gate_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fdiv2_div.hw > + }, > + .num_parents =3D 1, > + .flags =3D CLK_IS_CRITICAL, > + }, > +}; > + > +static struct clk_fixed_factor t7_fdiv2p5_div =3D { > + .mult =3D 2, > + .div =3D 5, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv2p5_div", > + .ops =3D &clk_fixed_factor_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fpll.hw > + }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fdiv2p5 =3D { > + .data =3D &(struct clk_regmap_gate_data){ > + .offset =3D FPLL_CTRL1, > + .bit_idx =3D 25, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv2p5", > + .ops =3D &clk_regmap_gate_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fdiv2p5_div.hw > + }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_fixed_factor t7_fdiv3_div =3D { > + .mult =3D 1, > + .div =3D 3, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv3_div", > + .ops =3D &clk_fixed_factor_ops, > + .parent_hws =3D (const struct clk_hw *[]) { &t7_fpll.hw }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fdiv3 =3D { > + .data =3D &(struct clk_regmap_gate_data){ > + .offset =3D FPLL_CTRL1, > + .bit_idx =3D 20, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv3", > + .ops =3D &clk_regmap_gate_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fdiv3_div.hw > + }, > + .num_parents =3D 1, > + .flags =3D CLK_IS_CRITICAL, > + }, > +}; > + > +static struct clk_fixed_factor t7_fdiv4_div =3D { > + .mult =3D 1, > + .div =3D 4, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv4_div", > + .ops =3D &clk_fixed_factor_ops, > + .parent_hws =3D (const struct clk_hw *[]) { &t7_fpll.hw }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fdiv4 =3D { > + .data =3D &(struct clk_regmap_gate_data){ > + .offset =3D FPLL_CTRL1, > + .bit_idx =3D 21, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv4", > + .ops =3D &clk_regmap_gate_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fdiv4_div.hw > + }, > + .num_parents =3D 1, > + .flags =3D CLK_IS_CRITICAL, > + }, > +}; > + > +static struct clk_fixed_factor t7_fdiv5_div =3D { > + .mult =3D 1, > + .div =3D 5, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv5_div", > + .ops =3D &clk_fixed_factor_ops, > + .parent_hws =3D (const struct clk_hw *[]) { &t7_fpll.hw }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fdiv5 =3D { > + .data =3D &(struct clk_regmap_gate_data){ > + .offset =3D FPLL_CTRL1, > + .bit_idx =3D 22, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv5", > + .ops =3D &clk_regmap_gate_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fdiv5_div.hw > + }, > + .num_parents =3D 1, > + .flags =3D CLK_IS_CRITICAL, > + }, > +}; > + > +static struct clk_fixed_factor t7_fdiv7_div =3D { > + .mult =3D 1, > + .div =3D 7, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv7_div", > + .ops =3D &clk_fixed_factor_ops, > + .parent_hws =3D (const struct clk_hw *[]) { &t7_fpll.hw }, > + .num_parents =3D 1, > + }, > +}; > + > +static struct clk_regmap t7_fdiv7 =3D { > + .data =3D &(struct clk_regmap_gate_data){ > + .offset =3D FPLL_CTRL1, > + .bit_idx =3D 23, > + }, > + .hw.init =3D &(struct clk_init_data){ > + .name =3D "fdiv7", > + .ops =3D &clk_regmap_gate_ops, > + .parent_hws =3D (const struct clk_hw *[]) { > + &t7_fdiv7_div.hw > + }, > + .num_parents =3D 1, > + .flags =3D CLK_IS_CRITICAL, > + }, > +}; > + > +static struct clk_hw *t7_fpll_hw_clks[] =3D { > + [CLKID_FPLL_DCO] =3D &t7_fpll_dco.hw, > + [CLKID_FPLL] =3D &t7_fpll.hw, > + [CLKID_FDIV2_DIV] =3D &t7_fdiv2_div.hw, > + [CLKID_FDIV2] =3D &t7_fdiv2.hw, > + [CLKID_FDIV2P5_DIV] =3D &t7_fdiv2p5_div.hw, > + [CLKID_FDIV2P5] =3D &t7_fdiv2p5.hw, > + [CLKID_FDIV3_DIV] =3D &t7_fdiv3_div.hw, > + [CLKID_FDIV3] =3D &t7_fdiv3.hw, > + [CLKID_FDIV4_DIV] =3D &t7_fdiv4_div.hw, > + [CLKID_FDIV4] =3D &t7_fdiv4.hw, > + [CLKID_FDIV5_DIV] =3D &t7_fdiv5_div.hw, > + [CLKID_FDIV5] =3D &t7_fdiv5.hw, > + [CLKID_FDIV7_DIV] =3D &t7_fdiv7_div.hw, > + [CLKID_FDIV7] =3D &t7_fdiv7.hw, > +}; > + > +static const struct meson_clkc_data t7_fpll_data =3D { > + .hw_clks =3D { > + .hws =3D t7_fpll_hw_clks, > + .num =3D ARRAY_SIZE(t7_fpll_hw_clks), > + }, > +}; > + > static const struct of_device_id t7_pll_clkc_match_table[] =3D { > { .compatible =3D "amlogic,t7-gp0-pll", .data =3D &t7_gp0_data, }, > { .compatible =3D "amlogic,t7-gp1-pll", .data =3D &t7_gp1_data, }, > @@ -1055,6 +1311,7 @@ static const struct of_device_id t7_pll_clkc_match_= table[] =3D { > { .compatible =3D "amlogic,t7-mpll", .data =3D &t7_mpll_data, }, > { .compatible =3D "amlogic,t7-hdmi-pll", .data =3D &t7_hdmi_data, }, > { .compatible =3D "amlogic,t7-mclk-pll", .data =3D &t7_mclk_data, }, > + { .compatible =3D "amlogic,t7-fpll", .data =3D &t7_fpll_data, }, > {} > }; > MODULE_DEVICE_TABLE(of, t7_pll_clkc_match_table); --=20 Jerome