From: Da Xue <da@libre.computer>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Jerome Brunet <jbrunet@baylibre.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Da Xue <da@libre.computer>,
linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] clk: meson-g12a: fix bit range for fixed sys and hifi pll
Date: Thu, 14 Aug 2025 16:09:53 -0400 [thread overview]
Message-ID: <20250814200953.1969944-1-da@libre.computer> (raw)
The bit range 17:0 does not match the datasheet for A311D / S905D3.
Change the bit range to 19:0 for FIX and HIFI PLLs to match datasheet.
There's no frac for sys pll so add that as well.
Signed-off-by: Da Xue <da@libre.computer>
---
drivers/clk/meson/g12a.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 66f0e817e416..f78cca619ca5 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -157,7 +157,7 @@ static struct clk_regmap g12a_fixed_pll_dco = {
.frac = {
.reg_off = HHI_FIX_PLL_CNTL1,
.shift = 0,
- .width = 17,
+ .width = 19,
},
.l = {
.reg_off = HHI_FIX_PLL_CNTL0,
@@ -223,6 +223,11 @@ static struct clk_regmap g12a_sys_pll_dco = {
.shift = 10,
.width = 5,
},
+ .frac = {
+ .reg_off = HHI_SYS_PLL_CNTL1,
+ .shift = 0,
+ .width = 19,
+ },
.l = {
.reg_off = HHI_SYS_PLL_CNTL0,
.shift = 31,
@@ -1901,7 +1906,7 @@ static struct clk_regmap g12a_hifi_pll_dco = {
.frac = {
.reg_off = HHI_HIFI_PLL_CNTL1,
.shift = 0,
- .width = 17,
+ .width = 19,
},
.l = {
.reg_off = HHI_HIFI_PLL_CNTL0,
--
2.47.2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Da Xue <da@libre.computer>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Jerome Brunet <jbrunet@baylibre.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Da Xue <da@libre.computer>,
linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] clk: meson-g12a: fix bit range for fixed sys and hifi pll
Date: Thu, 14 Aug 2025 16:09:53 -0400 [thread overview]
Message-ID: <20250814200953.1969944-1-da@libre.computer> (raw)
The bit range 17:0 does not match the datasheet for A311D / S905D3.
Change the bit range to 19:0 for FIX and HIFI PLLs to match datasheet.
There's no frac for sys pll so add that as well.
Signed-off-by: Da Xue <da@libre.computer>
---
drivers/clk/meson/g12a.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 66f0e817e416..f78cca619ca5 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -157,7 +157,7 @@ static struct clk_regmap g12a_fixed_pll_dco = {
.frac = {
.reg_off = HHI_FIX_PLL_CNTL1,
.shift = 0,
- .width = 17,
+ .width = 19,
},
.l = {
.reg_off = HHI_FIX_PLL_CNTL0,
@@ -223,6 +223,11 @@ static struct clk_regmap g12a_sys_pll_dco = {
.shift = 10,
.width = 5,
},
+ .frac = {
+ .reg_off = HHI_SYS_PLL_CNTL1,
+ .shift = 0,
+ .width = 19,
+ },
.l = {
.reg_off = HHI_SYS_PLL_CNTL0,
.shift = 31,
@@ -1901,7 +1906,7 @@ static struct clk_regmap g12a_hifi_pll_dco = {
.frac = {
.reg_off = HHI_HIFI_PLL_CNTL1,
.shift = 0,
- .width = 17,
+ .width = 19,
},
.l = {
.reg_off = HHI_HIFI_PLL_CNTL0,
--
2.47.2
next reply other threads:[~2025-08-14 20:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 20:09 Da Xue [this message]
2025-08-14 20:09 ` [PATCH] clk: meson-g12a: fix bit range for fixed sys and hifi pll Da Xue
2025-08-21 20:42 ` Martin Blumenstingl
2025-08-21 20:42 ` Martin Blumenstingl
2025-08-21 22:21 ` Da Xue
2025-08-21 22:21 ` Da Xue
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=20250814200953.1969944-1-da@libre.computer \
--to=da@libre.computer \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.