* [PATCH v0 0/1] Optimize tuning values from DT. @ 2025-01-10 12:33 Christian Bruel 2025-01-10 12:33 ` [PATCH 1/1] phy: stm32: " Christian Bruel 0 siblings, 1 reply; 3+ messages in thread From: Christian Bruel @ 2025-01-10 12:33 UTC (permalink / raw) To: vkoul, kishon, mcoquelin.stm32, alexandre.torgue, p.zabel, linux-phy, linux-stm32, linux-arm-kernel, linux-kernel, fabrice.gasnier Cc: Christian Bruel COMBOPHY thuning parameters was awkwardly refetched from the DT during tuning, better to fetch them in probe for reuse later and simplify the tuning function. Christian Bruel (1): phy: stm32: Optimize tuning values from DT. drivers/phy/st/phy-stm32-combophy.c | 87 +++++++++++++++-------------- 1 file changed, 44 insertions(+), 43 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] phy: stm32: Optimize tuning values from DT. 2025-01-10 12:33 [PATCH v0 0/1] Optimize tuning values from DT Christian Bruel @ 2025-01-10 12:33 ` Christian Bruel 2025-01-11 9:26 ` kernel test robot 0 siblings, 1 reply; 3+ messages in thread From: Christian Bruel @ 2025-01-10 12:33 UTC (permalink / raw) To: vkoul, kishon, mcoquelin.stm32, alexandre.torgue, p.zabel, linux-phy, linux-stm32, linux-arm-kernel, linux-kernel, fabrice.gasnier Cc: Christian Bruel phy_init can be recalled during PM resume. Thus cache the tuning values from the device tree. Don't read the known default ohm value from regmap. Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> --- drivers/phy/st/phy-stm32-combophy.c | 82 ++++++++++++++--------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/phy/st/phy-stm32-combophy.c b/drivers/phy/st/phy-stm32-combophy.c index 49e9fa90a681..198f1b4ba095 100644 --- a/drivers/phy/st/phy-stm32-combophy.c +++ b/drivers/phy/st/phy-stm32-combophy.c @@ -86,6 +86,10 @@ struct stm32_combophy { struct clk_bulk_data clks[ARRAY_SIZE(combophy_clks)]; int num_clks; bool have_pad_clk; + bool have_ssc; + int rx_eq; + u32 microohm; + u32 microvolt; unsigned int type; bool is_init; int irq_wakeup; @@ -112,27 +116,15 @@ static const struct clk_impedance imp_lookup[] = { { 3999000, { 571000, 648000, 726000, 803000 } } }; -static int stm32_impedance_tune(struct stm32_combophy *combophy) +static void stm32_impedance_tune(struct stm32_combophy *combophy) { - u8 imp_size = ARRAY_SIZE(imp_lookup); - u8 vswing_size = ARRAY_SIZE(imp_lookup[0].vswing); u8 imp_of, vswing_of; - u32 max_imp = imp_lookup[0].microohm; - u32 min_imp = imp_lookup[imp_size - 1].microohm; - u32 max_vswing = imp_lookup[imp_size - 1].vswing[vswing_size - 1]; - u32 min_vswing = imp_lookup[0].vswing[0]; - u32 val; u32 regval; - if (!of_property_read_u32(combophy->dev->of_node, "st,output-micro-ohms", &val)) { - if (val < min_imp || val > max_imp) { - dev_err(combophy->dev, "Invalid value %u for output ohm\n", val); - return -EINVAL; - } - + if (combophy->microohm) { regval = 0; for (imp_of = 0; imp_of < ARRAY_SIZE(imp_lookup); imp_of++) { - if (imp_lookup[imp_of].microohm <= val) { + if (imp_lookup[imp_of].microohm <= combophy->microohm) { regval = FIELD_PREP(STM32MP25_PCIEPRG_IMPCTRL_OHM, imp_of); break; } @@ -145,19 +137,14 @@ static int stm32_impedance_tune(struct stm32_combophy *combophy) STM32MP25_PCIEPRG_IMPCTRL_OHM, regval); } else { - regmap_read(combophy->regmap, SYSCFG_PCIEPRGCR, &val); - imp_of = FIELD_GET(STM32MP25_PCIEPRG_IMPCTRL_OHM, val); + /* default is 50 ohm */ + imp_of = 3; } - if (!of_property_read_u32(combophy->dev->of_node, "st,output-vswing-microvolt", &val)) { - if (val < min_vswing || val > max_vswing) { - dev_err(combophy->dev, "Invalid value %u for output vswing\n", val); - return -EINVAL; - } - + if (combophy->microvolt) { regval = 0; for (vswing_of = 0; vswing_of < ARRAY_SIZE(imp_lookup[imp_of].vswing); vswing_of++) { - if (imp_lookup[imp_of].vswing[vswing_of] >= val) { + if (imp_lookup[imp_of].vswing[vswing_of] >= combophy->microvolt) { regval = FIELD_PREP(STM32MP25_PCIEPRG_IMPCTRL_VSWING, vswing_of); break; } @@ -170,8 +157,6 @@ static int stm32_impedance_tune(struct stm32_combophy *combophy) STM32MP25_PCIEPRG_IMPCTRL_VSWING, regval); } - - return 0; } static int stm32_combophy_pll_init(struct stm32_combophy *combophy) @@ -197,7 +182,7 @@ static int stm32_combophy_pll_init(struct stm32_combophy *combophy) cr1_val |= SYSCFG_COMBOPHY_CR1_REFSSPEN; } - if (of_property_present(combophy->dev->of_node, "st,ssc-on")) { + if (combophy->have_ssc) { dev_dbg(combophy->dev, "Enabling clock with SSC\n"); cr1_mask |= SYSCFG_COMBOPHY_CR1_SSCEN; cr1_val |= SYSCFG_COMBOPHY_CR1_SSCEN; @@ -253,22 +238,14 @@ static int stm32_combophy_pll_init(struct stm32_combophy *combophy) reset_control_assert(combophy->phy_reset); if (combophy->type == PHY_TYPE_PCIE) { - ret = stm32_impedance_tune(combophy); - if (ret) - goto out_iso; + stm32_impedance_tune(combophy); cr1_mask |= SYSCFG_COMBOPHY_CR1_REFUSEPAD; cr1_val |= combophy->have_pad_clk ? SYSCFG_COMBOPHY_CR1_REFUSEPAD : 0; } - if (!of_property_read_u32(combophy->dev->of_node, "st,rx-equalizer", &val)) { - dev_dbg(combophy->dev, "Set RX equalizer %u\n", val); - if (val > SYSCFG_COMBOPHY_CR4_RX0_EQ) { - dev_err(combophy->dev, "Invalid value %u for rx0 equalizer\n", val); - ret = -EINVAL; - goto out_iso; - } - + if (combophy->rx_eq != -1) { + dev_dbg(combophy->dev, "Set RX equalizer %u\n", combophy->rx_eq); regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR4, SYSCFG_COMBOPHY_CR4_RX0_EQ, val); } @@ -314,9 +291,6 @@ static int stm32_combophy_pll_init(struct stm32_combophy *combophy) return 0; -out_iso: - reset_control_deassert(combophy->phy_reset); - out: regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR2, SYSCFG_COMBOPHY_CR2_ISO_DIS, 0); @@ -522,6 +496,12 @@ static int stm32_combophy_probe(struct platform_device *pdev) struct stm32_combophy *combophy; struct device *dev = &pdev->dev; struct phy_provider *phy_provider; + u8 imp_size = ARRAY_SIZE(imp_lookup); + u8 vswing_size = ARRAY_SIZE(imp_lookup[0].vswing); + u32 max_imp = imp_lookup[0].microohm; + u32 min_imp = imp_lookup[imp_size - 1].microohm; + u32 max_vswing = imp_lookup[imp_size - 1].vswing[vswing_size - 1]; + u32 min_vswing = imp_lookup[0].vswing[0]; int ret, irq; combophy = devm_kzalloc(dev, sizeof(*combophy), GFP_KERNEL); @@ -569,6 +549,26 @@ static int stm32_combophy_probe(struct platform_device *pdev) combophy->irq_wakeup); } + if (of_property_present(dev->of_node, "st,ssc-on")) + combophy->have_ssc = true; + + if (!of_property_read_u32(dev->of_node, "st,rx-equalizer", &combophy->rx_eq)) { + if (combophy->rx_eq > SYSCFG_COMBOPHY_CR4_RX0_EQ) + return dev_err_probe(dev, combophy->rx_eq, + "Invalid value for rx0 equalizer\n"); + } else + combophy->rx_eq = -1; + + if (!of_property_read_u32(dev->of_node, "st,output-micro-ohms", &combophy->microohm)) + if (combophy->microohm < min_imp || combophy->microohm > max_imp) + return dev_err_probe(dev, combophy->microohm, + "Invalid value for output ohm\n"); + + if (!of_property_read_u32(dev->of_node, "st,output-vswing-microvolt", &combophy->microvolt)) + if (combophy->microvolt < min_vswing || combophy->microvolt > max_vswing) + return dev_err_probe(dev, combophy->microvolt, + "Invalid value for output vswing\n"); + ret = devm_pm_runtime_enable(dev); if (ret) return dev_err_probe(dev, ret, "Failed to enable pm runtime\n"); -- 2.34.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] phy: stm32: Optimize tuning values from DT. 2025-01-10 12:33 ` [PATCH 1/1] phy: stm32: " Christian Bruel @ 2025-01-11 9:26 ` kernel test robot 0 siblings, 0 replies; 3+ messages in thread From: kernel test robot @ 2025-01-11 9:26 UTC (permalink / raw) To: Christian Bruel, vkoul, kishon, mcoquelin.stm32, alexandre.torgue, p.zabel, linux-phy, linux-stm32, linux-arm-kernel, linux-kernel, fabrice.gasnier Cc: llvm, oe-kbuild-all, Christian Bruel Hi Christian, kernel test robot noticed the following build warnings: [auto build test WARNING on v6.13-rc6] [also build test WARNING on linus/master next-20250110] [cannot apply to atorgue-stm32/stm32-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Christian-Bruel/phy-stm32-Optimize-tuning-values-from-DT/20250110-203802 base: v6.13-rc6 patch link: https://lore.kernel.org/r/20250110123356.974839-2-christian.bruel%40foss.st.com patch subject: [PATCH 1/1] phy: stm32: Optimize tuning values from DT. config: hexagon-randconfig-002-20250111 (https://download.01.org/0day-ci/archive/20250111/202501111758.hNwYV0yg-lkp@intel.com/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501111758.hNwYV0yg-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202501111758.hNwYV0yg-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/phy/st/phy-stm32-combophy.c:250:35: warning: variable 'val' is uninitialized when used here [-Wuninitialized] SYSCFG_COMBOPHY_CR4_RX0_EQ, val); ^~~ drivers/phy/st/phy-stm32-combophy.c:165:40: note: initialize the variable 'val' to silence this warning u32 refclksel, pllmult, propcntrl, val; ^ = 0 1 warning generated. vim +/val +250 drivers/phy/st/phy-stm32-combophy.c 47e1bb6b4ba098 Christian Bruel 2024-09-30 161 47e1bb6b4ba098 Christian Bruel 2024-09-30 162 static int stm32_combophy_pll_init(struct stm32_combophy *combophy) 47e1bb6b4ba098 Christian Bruel 2024-09-30 163 { 47e1bb6b4ba098 Christian Bruel 2024-09-30 164 int ret; 47e1bb6b4ba098 Christian Bruel 2024-09-30 165 u32 refclksel, pllmult, propcntrl, val; 47e1bb6b4ba098 Christian Bruel 2024-09-30 166 u32 clk_rate; 47e1bb6b4ba098 Christian Bruel 2024-09-30 167 struct clk *clk; 47e1bb6b4ba098 Christian Bruel 2024-09-30 168 u32 cr1_val = 0, cr1_mask = 0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 169 47e1bb6b4ba098 Christian Bruel 2024-09-30 170 if (combophy->have_pad_clk) 47e1bb6b4ba098 Christian Bruel 2024-09-30 171 clk = combophy->clks[PAD_CLK].clk; 47e1bb6b4ba098 Christian Bruel 2024-09-30 172 else 47e1bb6b4ba098 Christian Bruel 2024-09-30 173 clk = combophy->clks[KER_CLK].clk; 47e1bb6b4ba098 Christian Bruel 2024-09-30 174 47e1bb6b4ba098 Christian Bruel 2024-09-30 175 clk_rate = clk_get_rate(clk); 47e1bb6b4ba098 Christian Bruel 2024-09-30 176 47e1bb6b4ba098 Christian Bruel 2024-09-30 177 dev_dbg(combophy->dev, "%s pll init rate %d\n", 47e1bb6b4ba098 Christian Bruel 2024-09-30 178 combophy->have_pad_clk ? "External" : "Ker", clk_rate); 47e1bb6b4ba098 Christian Bruel 2024-09-30 179 47e1bb6b4ba098 Christian Bruel 2024-09-30 180 if (combophy->type != PHY_TYPE_PCIE) { 47e1bb6b4ba098 Christian Bruel 2024-09-30 181 cr1_mask |= SYSCFG_COMBOPHY_CR1_REFSSPEN; 47e1bb6b4ba098 Christian Bruel 2024-09-30 182 cr1_val |= SYSCFG_COMBOPHY_CR1_REFSSPEN; 47e1bb6b4ba098 Christian Bruel 2024-09-30 183 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 184 ce8b4a3e6b1975 Christian Bruel 2025-01-10 185 if (combophy->have_ssc) { 47e1bb6b4ba098 Christian Bruel 2024-09-30 186 dev_dbg(combophy->dev, "Enabling clock with SSC\n"); 47e1bb6b4ba098 Christian Bruel 2024-09-30 187 cr1_mask |= SYSCFG_COMBOPHY_CR1_SSCEN; 47e1bb6b4ba098 Christian Bruel 2024-09-30 188 cr1_val |= SYSCFG_COMBOPHY_CR1_SSCEN; 47e1bb6b4ba098 Christian Bruel 2024-09-30 189 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 190 47e1bb6b4ba098 Christian Bruel 2024-09-30 191 switch (clk_rate) { 47e1bb6b4ba098 Christian Bruel 2024-09-30 192 case 100000000: 47e1bb6b4ba098 Christian Bruel 2024-09-30 193 pllmult = MPLLMULT_100; 47e1bb6b4ba098 Christian Bruel 2024-09-30 194 refclksel = REFCLKSEL_0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 195 propcntrl = 0x8u << 4; 47e1bb6b4ba098 Christian Bruel 2024-09-30 196 break; 47e1bb6b4ba098 Christian Bruel 2024-09-30 197 case 19200000: 47e1bb6b4ba098 Christian Bruel 2024-09-30 198 pllmult = MPLLMULT_19_2; 47e1bb6b4ba098 Christian Bruel 2024-09-30 199 refclksel = REFCLKSEL_1; 47e1bb6b4ba098 Christian Bruel 2024-09-30 200 propcntrl = 0x8u << 4; 47e1bb6b4ba098 Christian Bruel 2024-09-30 201 break; 47e1bb6b4ba098 Christian Bruel 2024-09-30 202 case 25000000: 47e1bb6b4ba098 Christian Bruel 2024-09-30 203 pllmult = MPLLMULT_25; 47e1bb6b4ba098 Christian Bruel 2024-09-30 204 refclksel = REFCLKSEL_0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 205 propcntrl = 0xeu << 4; 47e1bb6b4ba098 Christian Bruel 2024-09-30 206 break; 47e1bb6b4ba098 Christian Bruel 2024-09-30 207 case 24000000: 47e1bb6b4ba098 Christian Bruel 2024-09-30 208 pllmult = MPLLMULT_24; 47e1bb6b4ba098 Christian Bruel 2024-09-30 209 refclksel = REFCLKSEL_1; 47e1bb6b4ba098 Christian Bruel 2024-09-30 210 propcntrl = 0xeu << 4; 47e1bb6b4ba098 Christian Bruel 2024-09-30 211 break; 47e1bb6b4ba098 Christian Bruel 2024-09-30 212 case 20000000: 47e1bb6b4ba098 Christian Bruel 2024-09-30 213 pllmult = MPLLMULT_20; 47e1bb6b4ba098 Christian Bruel 2024-09-30 214 refclksel = REFCLKSEL_0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 215 propcntrl = 0xeu << 4; 47e1bb6b4ba098 Christian Bruel 2024-09-30 216 break; 47e1bb6b4ba098 Christian Bruel 2024-09-30 217 default: 47e1bb6b4ba098 Christian Bruel 2024-09-30 218 dev_err(combophy->dev, "Invalid rate 0x%x\n", clk_rate); 47e1bb6b4ba098 Christian Bruel 2024-09-30 219 return -EINVAL; e592a65584fce0 Yang Li 2024-10-17 220 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 221 47e1bb6b4ba098 Christian Bruel 2024-09-30 222 cr1_mask |= SYSCFG_COMBOPHY_CR1_REFCLKDIV2; 47e1bb6b4ba098 Christian Bruel 2024-09-30 223 cr1_val |= REFCLDIV_0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 224 47e1bb6b4ba098 Christian Bruel 2024-09-30 225 cr1_mask |= SYSCFG_COMBOPHY_CR1_REFCLKSEL; 47e1bb6b4ba098 Christian Bruel 2024-09-30 226 cr1_val |= refclksel; 47e1bb6b4ba098 Christian Bruel 2024-09-30 227 47e1bb6b4ba098 Christian Bruel 2024-09-30 228 cr1_mask |= SYSCFG_COMBOPHY_CR1_MPLLMULT; 47e1bb6b4ba098 Christian Bruel 2024-09-30 229 cr1_val |= pllmult; 47e1bb6b4ba098 Christian Bruel 2024-09-30 230 47e1bb6b4ba098 Christian Bruel 2024-09-30 231 /* 47e1bb6b4ba098 Christian Bruel 2024-09-30 232 * vddcombophy is interconnected with vddcore. Isolation bit should be unset 47e1bb6b4ba098 Christian Bruel 2024-09-30 233 * before using the ComboPHY. 47e1bb6b4ba098 Christian Bruel 2024-09-30 234 */ 47e1bb6b4ba098 Christian Bruel 2024-09-30 235 regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR2, 47e1bb6b4ba098 Christian Bruel 2024-09-30 236 SYSCFG_COMBOPHY_CR2_ISO_DIS, SYSCFG_COMBOPHY_CR2_ISO_DIS); 47e1bb6b4ba098 Christian Bruel 2024-09-30 237 47e1bb6b4ba098 Christian Bruel 2024-09-30 238 reset_control_assert(combophy->phy_reset); 47e1bb6b4ba098 Christian Bruel 2024-09-30 239 47e1bb6b4ba098 Christian Bruel 2024-09-30 240 if (combophy->type == PHY_TYPE_PCIE) { ce8b4a3e6b1975 Christian Bruel 2025-01-10 241 stm32_impedance_tune(combophy); 47e1bb6b4ba098 Christian Bruel 2024-09-30 242 47e1bb6b4ba098 Christian Bruel 2024-09-30 243 cr1_mask |= SYSCFG_COMBOPHY_CR1_REFUSEPAD; 47e1bb6b4ba098 Christian Bruel 2024-09-30 244 cr1_val |= combophy->have_pad_clk ? SYSCFG_COMBOPHY_CR1_REFUSEPAD : 0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 245 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 246 ce8b4a3e6b1975 Christian Bruel 2025-01-10 247 if (combophy->rx_eq != -1) { ce8b4a3e6b1975 Christian Bruel 2025-01-10 248 dev_dbg(combophy->dev, "Set RX equalizer %u\n", combophy->rx_eq); 47e1bb6b4ba098 Christian Bruel 2024-09-30 249 regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR4, 47e1bb6b4ba098 Christian Bruel 2024-09-30 @250 SYSCFG_COMBOPHY_CR4_RX0_EQ, val); 47e1bb6b4ba098 Christian Bruel 2024-09-30 251 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 252 47e1bb6b4ba098 Christian Bruel 2024-09-30 253 regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR1, cr1_mask, cr1_val); 47e1bb6b4ba098 Christian Bruel 2024-09-30 254 47e1bb6b4ba098 Christian Bruel 2024-09-30 255 /* 47e1bb6b4ba098 Christian Bruel 2024-09-30 256 * Force elasticity buffer to be tuned for the reference clock as 47e1bb6b4ba098 Christian Bruel 2024-09-30 257 * the separated clock model is not supported 47e1bb6b4ba098 Christian Bruel 2024-09-30 258 */ 47e1bb6b4ba098 Christian Bruel 2024-09-30 259 regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR5, 47e1bb6b4ba098 Christian Bruel 2024-09-30 260 SYSCFG_COMBOPHY_CR5_COMMON_CLOCKS, SYSCFG_COMBOPHY_CR5_COMMON_CLOCKS); 47e1bb6b4ba098 Christian Bruel 2024-09-30 261 47e1bb6b4ba098 Christian Bruel 2024-09-30 262 reset_control_deassert(combophy->phy_reset); 47e1bb6b4ba098 Christian Bruel 2024-09-30 263 47e1bb6b4ba098 Christian Bruel 2024-09-30 264 ret = regmap_read_poll_timeout(combophy->regmap, SYSCFG_COMBOPHY_SR, val, 47e1bb6b4ba098 Christian Bruel 2024-09-30 265 !(val & STM32MP25_PIPE0_PHYSTATUS), 47e1bb6b4ba098 Christian Bruel 2024-09-30 266 10, 1000); 47e1bb6b4ba098 Christian Bruel 2024-09-30 267 if (ret) { 47e1bb6b4ba098 Christian Bruel 2024-09-30 268 dev_err(combophy->dev, "timeout, cannot lock PLL\n"); 47e1bb6b4ba098 Christian Bruel 2024-09-30 269 if (combophy->type == PHY_TYPE_PCIE && !combophy->have_pad_clk) 47e1bb6b4ba098 Christian Bruel 2024-09-30 270 regmap_update_bits(combophy->regmap, SYSCFG_PCIEPRGCR, 47e1bb6b4ba098 Christian Bruel 2024-09-30 271 STM32MP25_PCIEPRGCR_EN, 0); 47e1bb6b4ba098 Christian Bruel 2024-09-30 272 47e1bb6b4ba098 Christian Bruel 2024-09-30 273 if (combophy->type != PHY_TYPE_PCIE) 47e1bb6b4ba098 Christian Bruel 2024-09-30 274 regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR1, 47e1bb6b4ba098 Christian Bruel 2024-09-30 275 SYSCFG_COMBOPHY_CR1_REFSSPEN, 0); 47e1bb6b4ba098 Christian Bruel 2024-09-30 276 47e1bb6b4ba098 Christian Bruel 2024-09-30 277 goto out; 47e1bb6b4ba098 Christian Bruel 2024-09-30 278 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 279 47e1bb6b4ba098 Christian Bruel 2024-09-30 280 47e1bb6b4ba098 Christian Bruel 2024-09-30 281 if (combophy->type == PHY_TYPE_PCIE) { 47e1bb6b4ba098 Christian Bruel 2024-09-30 282 if (!combophy->have_pad_clk) 47e1bb6b4ba098 Christian Bruel 2024-09-30 283 regmap_update_bits(combophy->regmap, SYSCFG_PCIEPRGCR, 47e1bb6b4ba098 Christian Bruel 2024-09-30 284 STM32MP25_PCIEPRGCR_EN, STM32MP25_PCIEPRGCR_EN); 47e1bb6b4ba098 Christian Bruel 2024-09-30 285 47e1bb6b4ba098 Christian Bruel 2024-09-30 286 val = readl_relaxed(combophy->base + COMBOPHY_SUP_ANA_MPLL_LOOP_CTL); 47e1bb6b4ba098 Christian Bruel 2024-09-30 287 val &= ~COMBOPHY_PROP_CNTRL; 47e1bb6b4ba098 Christian Bruel 2024-09-30 288 val |= propcntrl; 47e1bb6b4ba098 Christian Bruel 2024-09-30 289 writel_relaxed(val, combophy->base + COMBOPHY_SUP_ANA_MPLL_LOOP_CTL); 47e1bb6b4ba098 Christian Bruel 2024-09-30 290 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 291 47e1bb6b4ba098 Christian Bruel 2024-09-30 292 return 0; 47e1bb6b4ba098 Christian Bruel 2024-09-30 293 47e1bb6b4ba098 Christian Bruel 2024-09-30 294 out: 47e1bb6b4ba098 Christian Bruel 2024-09-30 295 regmap_update_bits(combophy->regmap, SYSCFG_COMBOPHY_CR2, 47e1bb6b4ba098 Christian Bruel 2024-09-30 296 SYSCFG_COMBOPHY_CR2_ISO_DIS, 0); 47e1bb6b4ba098 Christian Bruel 2024-09-30 297 47e1bb6b4ba098 Christian Bruel 2024-09-30 298 return ret; 47e1bb6b4ba098 Christian Bruel 2024-09-30 299 } 47e1bb6b4ba098 Christian Bruel 2024-09-30 300 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-11 9:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-01-10 12:33 [PATCH v0 0/1] Optimize tuning values from DT Christian Bruel 2025-01-10 12:33 ` [PATCH 1/1] phy: stm32: " Christian Bruel 2025-01-11 9:26 ` kernel test robot
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®