Skip to content

Commit 6357efe

Browse files
devi priyaandersson
authored andcommitted
clk: qcom: ipq9574: Update the alpha PLL type for GPLLs
Update PLL offsets to DEFAULT_EVO to configure MDIO to 800MHz. The incorrect clock frequency leads to an incorrect MDIO clock. This, in turn, affects the MDIO hardware configurations as the divider is calculated from the MDIO clock frequency. If the clock frequency is not as expected, the MDIO register fails due to the generation of an incorrect MDIO frequency. This issue is critical as it results in incorrect MDIO configurations and ultimately leads to the MDIO function not working. This results in a complete feature failure affecting all Ethernet PHYs. Specifically, Ethernet will not work on IPQ9574 due to this issue. Currently, the clock frequency is set to CLK_ALPHA_PLL_TYPE_DEFAULT. However, this setting does not yield the expected clock frequency. To rectify this, we need to change this to CLK_ALPHA_PLL_TYPE_DEFAULT_EVO. This modification ensures that the clock frequency aligns with our expectations, thereby resolving the MDIO register failure and ensuring the proper functioning of the Ethernet on IPQ9574. Fixes: d75b82c ("clk: qcom: Add Global Clock Controller driver for IPQ9574") Signed-off-by: devi priya <quic_devipriy@quicinc.com> Signed-off-by: Amandeep Singh <quic_amansing@quicinc.com> Link: https://lore.kernel.org/r/20240806061105.2849944-1-quic_amansing@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent f4c16a7 commit 6357efe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/clk/qcom/gcc-ipq9574.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static const struct clk_parent_data gcc_sleep_clk_data[] = {
6868

6969
static struct clk_alpha_pll gpll0_main = {
7070
.offset = 0x20000,
71-
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
71+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
7272
.clkr = {
7373
.enable_reg = 0x0b000,
7474
.enable_mask = BIT(0),
@@ -96,7 +96,7 @@ static struct clk_fixed_factor gpll0_out_main_div2 = {
9696

9797
static struct clk_alpha_pll_postdiv gpll0 = {
9898
.offset = 0x20000,
99-
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
99+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
100100
.width = 4,
101101
.clkr.hw.init = &(const struct clk_init_data) {
102102
.name = "gpll0",
@@ -110,7 +110,7 @@ static struct clk_alpha_pll_postdiv gpll0 = {
110110

111111
static struct clk_alpha_pll gpll4_main = {
112112
.offset = 0x22000,
113-
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
113+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
114114
.clkr = {
115115
.enable_reg = 0x0b000,
116116
.enable_mask = BIT(2),
@@ -125,7 +125,7 @@ static struct clk_alpha_pll gpll4_main = {
125125

126126
static struct clk_alpha_pll_postdiv gpll4 = {
127127
.offset = 0x22000,
128-
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
128+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
129129
.width = 4,
130130
.clkr.hw.init = &(const struct clk_init_data) {
131131
.name = "gpll4",
@@ -139,7 +139,7 @@ static struct clk_alpha_pll_postdiv gpll4 = {
139139

140140
static struct clk_alpha_pll gpll2_main = {
141141
.offset = 0x21000,
142-
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
142+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
143143
.clkr = {
144144
.enable_reg = 0x0b000,
145145
.enable_mask = BIT(1),
@@ -154,7 +154,7 @@ static struct clk_alpha_pll gpll2_main = {
154154

155155
static struct clk_alpha_pll_postdiv gpll2 = {
156156
.offset = 0x21000,
157-
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
157+
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT_EVO],
158158
.width = 4,
159159
.clkr.hw.init = &(const struct clk_init_data) {
160160
.name = "gpll2",

0 commit comments

Comments
 (0)