* [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
@ 2025-05-13 11:08 Kathiravan Thirumoorthy
2025-05-14 15:34 ` Andi Shyti
2025-07-29 22:42 ` Andi Shyti
0 siblings, 2 replies; 7+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-05-13 11:08 UTC (permalink / raw)
To: Mukesh Kumar Savaliya, Viken Dadhaniya, Andi Shyti,
Manikanta Mylavarapu, Bjorn Andersson
Cc: linux-i2c, linux-arm-msm, linux-kernel, stable, Kathiravan Thirumoorthy
Update the I2C frequency table to match the recommended values
specified in the I2C hardware programming guide. In the current IPQ5424
configuration where 32MHz is the source clock, the I2C bus frequencies do
not meet expectations—for instance, 363KHz is achieved instead of the
expected 400KHz.
Cc: stable@kernel.org
Fixes: 506bb2ab0075 ("i2c: qcom-geni: Support systems with 32MHz serial engine clock")
Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
---
drivers/i2c/busses/i2c-qcom-geni.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index ccea575fb7838db864ca4a2b21ebb3835b2567b2..2fec7b44bfc1baec68e321a9f57de4156120919b 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -155,9 +155,9 @@ static const struct geni_i2c_clk_fld geni_i2c_clk_map_19p2mhz[] = {
/* source_clock = 32 MHz */
static const struct geni_i2c_clk_fld geni_i2c_clk_map_32mhz[] = {
- { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 40 },
- { I2C_MAX_FAST_MODE_FREQ, 4, 3, 11, 20 },
- { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 6, 15 },
+ { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 38 },
+ { I2C_MAX_FAST_MODE_FREQ, 4, 3, 9, 19 },
+ { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 5, 15 },
{}
};
---
base-commit: edef457004774e598fc4c1b7d1d4f0bcd9d0bb30
change-id: 20250513-i2c-bus-freq-ac46343869a4
Best regards,
--
Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
2025-05-13 11:08 [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates Kathiravan Thirumoorthy
@ 2025-05-14 15:34 ` Andi Shyti
2025-05-15 18:53 ` Mukesh Kumar Savaliya
2025-07-29 22:42 ` Andi Shyti
1 sibling, 1 reply; 7+ messages in thread
From: Andi Shyti @ 2025-05-14 15:34 UTC (permalink / raw)
To: Kathiravan Thirumoorthy
Cc: Mukesh Kumar Savaliya, Viken Dadhaniya, Manikanta Mylavarapu,
Bjorn Andersson, linux-i2c, linux-arm-msm, linux-kernel, stable
Hi,
On Tue, May 13, 2025 at 04:38:33PM +0530, Kathiravan Thirumoorthy wrote:
> Update the I2C frequency table to match the recommended values
> specified in the I2C hardware programming guide. In the current IPQ5424
> configuration where 32MHz is the source clock, the I2C bus frequencies do
> not meet expectations—for instance, 363KHz is achieved instead of the
> expected 400KHz.
>
> Cc: stable@kernel.org
> Fixes: 506bb2ab0075 ("i2c: qcom-geni: Support systems with 32MHz serial engine clock")
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> ---
> drivers/i2c/busses/i2c-qcom-geni.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index ccea575fb7838db864ca4a2b21ebb3835b2567b2..2fec7b44bfc1baec68e321a9f57de4156120919b 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -155,9 +155,9 @@ static const struct geni_i2c_clk_fld geni_i2c_clk_map_19p2mhz[] = {
>
> /* source_clock = 32 MHz */
> static const struct geni_i2c_clk_fld geni_i2c_clk_map_32mhz[] = {
> - { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 40 },
> - { I2C_MAX_FAST_MODE_FREQ, 4, 3, 11, 20 },
> - { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 6, 15 },
> + { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 38 },
> + { I2C_MAX_FAST_MODE_FREQ, 4, 3, 9, 19 },
> + { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 5, 15 },
argh!
Can someone from Qualcomm look at this fix? Mukesh, Viken?
Thanks,
Andi
> {}
> };
>
>
> ---
> base-commit: edef457004774e598fc4c1b7d1d4f0bcd9d0bb30
> change-id: 20250513-i2c-bus-freq-ac46343869a4
>
> Best regards,
> --
> Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
2025-05-14 15:34 ` Andi Shyti
@ 2025-05-15 18:53 ` Mukesh Kumar Savaliya
2025-05-16 8:46 ` Andi Shyti
0 siblings, 1 reply; 7+ messages in thread
From: Mukesh Kumar Savaliya @ 2025-05-15 18:53 UTC (permalink / raw)
To: Andi Shyti, Kathiravan Thirumoorthy
Cc: Viken Dadhaniya, Manikanta Mylavarapu, Bjorn Andersson,
linux-i2c, linux-arm-msm, linux-kernel, stable
Thanks Andi !
On 5/14/2025 9:04 PM, Andi Shyti wrote:
[...]
>> /* source_clock = 32 MHz */
>> static const struct geni_i2c_clk_fld geni_i2c_clk_map_32mhz[] = {
>> - { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 40 },
>> - { I2C_MAX_FAST_MODE_FREQ, 4, 3, 11, 20 },
>> - { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 6, 15 },
>> + { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 38 },
>> + { I2C_MAX_FAST_MODE_FREQ, 4, 3, 9, 19 },
>> + { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 5, 15 },
>
> argh!
>
> Can someone from Qualcomm look at this fix? Mukesh, Viken?
Yes, I am reviewing internally and verifying the same with latest
Guidance and updates. Let me update on this once reviewed.
>
> Thanks,
> Andi
>
>> {}
>> };
>>
>>
>> ---
>> base-commit: edef457004774e598fc4c1b7d1d4f0bcd9d0bb30
>> change-id: 20250513-i2c-bus-freq-ac46343869a4
>>
>> Best regards,
>> --
>> Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
2025-05-15 18:53 ` Mukesh Kumar Savaliya
@ 2025-05-16 8:46 ` Andi Shyti
2025-05-21 6:25 ` Mukesh Kumar Savaliya
0 siblings, 1 reply; 7+ messages in thread
From: Andi Shyti @ 2025-05-16 8:46 UTC (permalink / raw)
To: Mukesh Kumar Savaliya
Cc: Kathiravan Thirumoorthy, Viken Dadhaniya, Manikanta Mylavarapu,
Bjorn Andersson, linux-i2c, linux-arm-msm, linux-kernel, stable
Hi Mukesh,
On Fri, May 16, 2025 at 12:23:46AM +0530, Mukesh Kumar Savaliya wrote:
> > > /* source_clock = 32 MHz */
> > > static const struct geni_i2c_clk_fld geni_i2c_clk_map_32mhz[] = {
> > > - { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 40 },
> > > - { I2C_MAX_FAST_MODE_FREQ, 4, 3, 11, 20 },
> > > - { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 6, 15 },
> > > + { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 38 },
> > > + { I2C_MAX_FAST_MODE_FREQ, 4, 3, 9, 19 },
> > > + { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 5, 15 },
> >
> > argh!
> >
> > Can someone from Qualcomm look at this fix? Mukesh, Viken?
> Yes, I am reviewing internally and verifying the same with latest Guidance
> and updates. Let me update on this once reviewed.
thanks a lot! It's very much appreciated!
Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
2025-05-16 8:46 ` Andi Shyti
@ 2025-05-21 6:25 ` Mukesh Kumar Savaliya
0 siblings, 0 replies; 7+ messages in thread
From: Mukesh Kumar Savaliya @ 2025-05-21 6:25 UTC (permalink / raw)
To: Andi Shyti
Cc: Kathiravan Thirumoorthy, Viken Dadhaniya, Manikanta Mylavarapu,
Bjorn Andersson, linux-i2c, linux-arm-msm, linux-kernel, stable
Looks good to me, Thanks Kathiravan, Andi !
On 5/16/2025 2:16 PM, Andi Shyti wrote:
> Hi Mukesh,
>
> On Fri, May 16, 2025 at 12:23:46AM +0530, Mukesh Kumar Savaliya wrote:
>>>> /* source_clock = 32 MHz */
>>>> static const struct geni_i2c_clk_fld geni_i2c_clk_map_32mhz[] = {
>>>> - { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 40 },
>>>> - { I2C_MAX_FAST_MODE_FREQ, 4, 3, 11, 20 },
>>>> - { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 6, 15 },
>>>> + { I2C_MAX_STANDARD_MODE_FREQ, 8, 14, 18, 38 },
>>>> + { I2C_MAX_FAST_MODE_FREQ, 4, 3, 9, 19 },
>>>> + { I2C_MAX_FAST_MODE_PLUS_FREQ, 2, 3, 5, 15 },
>>>
>>> argh!
>>>
>>> Can someone from Qualcomm look at this fix? Mukesh, Viken?
>> Yes, I am reviewing internally and verifying the same with latest Guidance
>> and updates. Let me update on this once reviewed.
>
> thanks a lot! It's very much appreciated!
>
Reviewed-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
> Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
2025-05-13 11:08 [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates Kathiravan Thirumoorthy
2025-05-14 15:34 ` Andi Shyti
@ 2025-07-29 22:42 ` Andi Shyti
2025-07-30 10:21 ` Kathiravan Thirumoorthy
1 sibling, 1 reply; 7+ messages in thread
From: Andi Shyti @ 2025-07-29 22:42 UTC (permalink / raw)
To: Kathiravan Thirumoorthy
Cc: Mukesh Kumar Savaliya, Viken Dadhaniya, Manikanta Mylavarapu,
Bjorn Andersson, linux-i2c, linux-arm-msm, linux-kernel, stable
Hi Kathiravan,
On Tue, May 13, 2025 at 04:38:33PM +0530, Kathiravan Thirumoorthy wrote:
> Update the I2C frequency table to match the recommended values
> specified in the I2C hardware programming guide. In the current IPQ5424
> configuration where 32MHz is the source clock, the I2C bus frequencies do
> not meet expectations—for instance, 363KHz is achieved instead of the
> expected 400KHz.
>
> Cc: stable@kernel.org
> Fixes: 506bb2ab0075 ("i2c: qcom-geni: Support systems with 32MHz serial engine clock")
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
I was sure I did apply this patch, but for some reason it has
completely slipped from my sight.
Now it's applied in i2c/i2c-host.
Thanks,
Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates
2025-07-29 22:42 ` Andi Shyti
@ 2025-07-30 10:21 ` Kathiravan Thirumoorthy
0 siblings, 0 replies; 7+ messages in thread
From: Kathiravan Thirumoorthy @ 2025-07-30 10:21 UTC (permalink / raw)
To: Andi Shyti
Cc: Mukesh Kumar Savaliya, Viken Dadhaniya, Manikanta Mylavarapu,
Bjorn Andersson, linux-i2c, linux-arm-msm, linux-kernel, stable
On 7/30/2025 4:12 AM, Andi Shyti wrote:
> Hi Kathiravan,
>
> On Tue, May 13, 2025 at 04:38:33PM +0530, Kathiravan Thirumoorthy wrote:
>> Update the I2C frequency table to match the recommended values
>> specified in the I2C hardware programming guide. In the current IPQ5424
>> configuration where 32MHz is the source clock, the I2C bus frequencies do
>> not meet expectations—for instance, 363KHz is achieved instead of the
>> expected 400KHz.
>>
>> Cc: stable@kernel.org
>> Fixes: 506bb2ab0075 ("i2c: qcom-geni: Support systems with 32MHz serial engine clock")
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
> I was sure I did apply this patch, but for some reason it has
> completely slipped from my sight.
Thanks Andi! I was about to remind you on this today :)
>
> Now it's applied in i2c/i2c-host.
Hope it will be part of 6.17 PR.
>
> Thanks,
> Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-07-30 10:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-13 11:08 [PATCH] i2c: qcom-geni: fix I2C frequency table to achieve accurate bus rates Kathiravan Thirumoorthy
2025-05-14 15:34 ` Andi Shyti
2025-05-15 18:53 ` Mukesh Kumar Savaliya
2025-05-16 8:46 ` Andi Shyti
2025-05-21 6:25 ` Mukesh Kumar Savaliya
2025-07-29 22:42 ` Andi Shyti
2025-07-30 10:21 ` Kathiravan Thirumoorthy
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®