From: Rengarajan S <rengarajan.s@microchip.com>
To: <tharunkumar.pasumarthi@microchip.com>,
<kumaravel.thiagarajan@microchip.com>,
<UNGLinuxDriver@microchip.com>, <andi.shyti@kernel.org>,
<linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <rengarajan.s@microchip.com>
Subject: [PATCH v1 i2c-master] i2c: mchp-pci1xxxx: Update minimum bus idle time
Date: Thu, 24 Jul 2025 09:34:22 +0530 [thread overview]
Message-ID: <20250724040422.6546-2-rengarajan.s@microchip.com> (raw)
In-Reply-To: <20250724040422.6546-1-rengarajan.s@microchip.com>
The SMBUS controller clock is designed with a 64 MHz clock for the
MCU, while the PCI1xxxx chip assumes a 31.25 MHz baud clock. SMBUS
controller register values are calculated considering 1 unit = 32 ns.
Based on this unit, the BUS_IDLE_MIN register values are updated for
all supported clock frequencies. Setting the MSB of BUS_IDLE_MIN[7:0]
register further scales the minimum bus idle time by a factor of 4.
Fixes: aa874cdfec07 ("i2c: mchp-pci1xxxx: Update Timing registers")
Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
---
drivers/i2c/busses/i2c-mchp-pci1xxxx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
index 5ef136c3ecb1..cb9455b38c1d 100644
--- a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
+++ b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
@@ -190,9 +190,9 @@
* Bus Idle Minimum time = BUS_IDLE_MIN[7:0] x Baud_Clock_Period x
* (BUS_IDLE_MIN_XK_TICKS[7] ? 4,1)
*/
-#define BUS_IDLE_MIN_100K_TICKS 36UL
-#define BUS_IDLE_MIN_400K_TICKS 10UL
-#define BUS_IDLE_MIN_1000K_TICKS 4UL
+#define BUS_IDLE_MIN_100K_TICKS 165
+#define BUS_IDLE_MIN_400K_TICKS 40
+#define BUS_IDLE_MIN_1000K_TICKS 16
/*
* CTRL_CUM_TIME_OUT_XK_TICKS defines SMBus Controller Cumulative Time-Out.
--
2.25.1
prev parent reply other threads:[~2025-07-24 4:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 4:04 [PATCH v1 i2c-master] i2c: mchp-pci1xxxx: PCIe Hot reset disable support for Rev C0+ devices Rengarajan S
2025-07-24 4:04 ` Rengarajan S [this message]
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=20250724040422.6546-2-rengarajan.s@microchip.com \
--to=rengarajan.s@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andi.shyti@kernel.org \
--cc=kumaravel.thiagarajan@microchip.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tharunkumar.pasumarthi@microchip.com \
/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 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®