Skip to content

Commit 67ee9fd

Browse files
kblaiechwsakernel
authored andcommitted
i2c: mlxbf: Update reference clock frequency
The reference clock frequency remains the same across Bluefield products. Thus, update the frequency and rename the macro. Fixes: b5b5b32 ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Khalil Blaiech <kblaiech@nvidia.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent 4b19d80 commit 67ee9fd

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

drivers/i2c/busses/i2c-mlxbf.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@
6262
* Master. Default value is set to 400MHz.
6363
*/
6464
#define MLXBF_I2C_TYU_PLL_OUT_FREQ (400 * 1000 * 1000)
65-
/* Reference clock for Bluefield 1 - 156 MHz. */
66-
#define MLXBF_I2C_TYU_PLL_IN_FREQ (156 * 1000 * 1000)
67-
/* Reference clock for BlueField 2 - 200 MHz. */
68-
#define MLXBF_I2C_YU_PLL_IN_FREQ (200 * 1000 * 1000)
65+
/* Reference clock for Bluefield - 156 MHz. */
66+
#define MLXBF_I2C_PLL_IN_FREQ (156 * 1000 * 1000)
6967

7068
/* Constant used to determine the PLL frequency. */
7169
#define MLNXBF_I2C_COREPLL_CONST 16384
@@ -1422,7 +1420,7 @@ static u64 mlxbf_calculate_freq_from_tyu(struct mlxbf_i2c_resource *corepll_res)
14221420
u32 corepll_val;
14231421
u16 core_f;
14241422

1425-
pad_frequency = MLXBF_I2C_TYU_PLL_IN_FREQ;
1423+
pad_frequency = MLXBF_I2C_PLL_IN_FREQ;
14261424

14271425
corepll_val = readl(corepll_res->io + MLXBF_I2C_CORE_PLL_REG1);
14281426

@@ -1457,7 +1455,7 @@ static u64 mlxbf_calculate_freq_from_yu(struct mlxbf_i2c_resource *corepll_res)
14571455
u8 core_od, core_r;
14581456
u32 core_f;
14591457

1460-
pad_frequency = MLXBF_I2C_YU_PLL_IN_FREQ;
1458+
pad_frequency = MLXBF_I2C_PLL_IN_FREQ;
14611459

14621460
corepll_reg1_val = readl(corepll_res->io + MLXBF_I2C_CORE_PLL_REG1);
14631461
corepll_reg2_val = readl(corepll_res->io + MLXBF_I2C_CORE_PLL_REG2);

0 commit comments

Comments
 (0)