diff options
author | Tyrone Ting <kfting@nuvoton.com> | 2024-12-19 17:08:58 +0800 |
---|---|---|
committer | Andi Shyti <andi.shyti@kernel.org> | 2025-01-07 23:46:10 +0100 |
commit | 6ddc9132bc42a7dfcaca0cce4ff0f94e69bc5114 (patch) | |
tree | 2d8b5c7f67525d4e254cce3c858df92f5844c945 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 862dd4f7733a694b12ad9e023ce639e9c21d6abd (diff) |
i2c: npcm: use i2c frequency table
Modify i2c frequency from table parameters for NPCM i2c modules.
Supported frequencies are:
1. 100KHz
2. 400KHz
3. 1MHz
The original equations were tested on a variety of chips and base clocks.
Since we added devices that use higher frequencies of the module we
saw that there is a mismatch between the equation and the actual
results on the bus itself, measured on scope.
Meanwhile, the equations were not accurate to begin with.
They are an approximation of the ideal value. The ideal value is
calculated per frequency of the core module.
So instead of using the equations we did an optimization per module
frequency, verified on a device.
Most of the work was focused on the rise time of the SCL and SDA,
which depends on external load of the bus and PU.
Different PCB designs, or specifically to this case: the number
and type of targets on the bus, impact the required values for
the timing registers.
Users can recalculate the numbers for each bus and get an even better
optimization, but our users chose not to.
We manually picked values per frequency that match the entire valid
range of targets (from 1 to max number). Then we check against the
AMR described in SMB spec and make sure that none of the values
is exceeding.
This process was led by the chip architect and included a lot of testing.
Signed-off-by: Tyrone Ting <kfting@nuvoton.com>
Reviewed-by: Tali Perry <tali.perry1@gmail.com>
Link: https://lore.kernel.org/r/20241219090859.18722-4-kfting@nuvoton.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions