Hi, Leo:
Sorry for the late reply
First of all, you can not turn on all uart log.
Only one that you can turn is to count before/after i2c transaction by using the below command.
echo -n “file i2c-designware-core.c line 782 +p” > /sys/kernel/debug/dynamic_debug/control
I have updated the loader image. It seems i2c0 looks normal.
But I also did some experiments to also read 16 bytes data for i2c0/i2c7 400K/1M/3.4M.
Below’s the experiment result.
i2c0 400KHz
Oscilloscope screenshot
total time
clock output from i2c IP
[ 59.296153] i2c_designware ffd71000.i2c: start1 stop, ns = 541667
[ 65.127056] i2c_designware ffd71000.i2c: start1 stop, ns = 538021
[ 67.055718] i2c_designware ffd71000.i2c: start1 stop, ns = 547396
[ 68.976881] i2c_designware ffd71000.i2c: start1 stop, ns = 642187
[ 70.599755] i2c_designware ffd71000.i2c: start1 stop, ns = 547917
[ 72.071762] i2c_designware ffd71000.i2c: start1 stop, ns = 538021
[ 73.727720] i2c_designware ffd71000.i2c: start1 stop, ns = 556771
[ 76.954226] i2c_designware ffd71000.i2c: start1 stop, ns = 7531770
[ 78.641764] i2c_designware ffd71000.i2c: start1 stop, ns = 565104
[ 80.183837] i2c_designware ffd71000.i2c: start1 stop, ns = 542708
[ 81.711164] i2c_designware ffd71000.i2c: start1 stop, ns = 520312
[ 83.312073] i2c_designware ffd71000.i2c: start1 stop, ns = 554166
[ 102.181712] i2c_designware ffd71000.i2c: start1 stop, ns = 653645
[ 107.318715] i2c_designware ffd71000.i2c: start1 stop, ns = 538021
[ 109.154961] i2c_designware ffd71000.i2c: start1 stop, ns = 540625
[ 110.439505] i2c_designware ffd71000.i2c: start1 stop, ns = 520834
[ 111.631998] i2c_designware ffd71000.i2c: start1 stop, ns = 518750
i2c0 1MHz
total time
i2c clock output from i2c IP
[ 51.588048] i2c_designware ffd71000.i2c: start1 stop, ns = 585937
[ 56.562133] i2c_designware ffd71000.i2c: start1 stop, ns = 544271
[ 58.130765] i2c_designware ffd71000.i2c: start1 stop, ns = 536458
[ 59.378611] i2c_designware ffd71000.i2c: start1 stop, ns = 526042
[ 61.066562] i2c_designware ffd71000.i2c: start1 stop, ns = 542709
[ 63.818838] i2c_designware ffd71000.i2c: start1 stop, ns = 575000
[ 66.684354] i2c_designware ffd71000.i2c: start1 stop, ns = 814062
[ 84.233830] i2c_designware ffd71000.i2c: start1 stop, ns = 574479
[ 86.665826] i2c_designware ffd71000.i2c: start1 stop, ns = 538021
[ 88.010006] i2c_designware ffd71000.i2c: start1 stop, ns = 542188
[ 89.681807] i2c_designware ffd71000.i2c: start1 stop, ns = 543750
[ 91.218290] i2c_designware ffd71000.i2c: start1 stop, ns = 779167
i2c0 3.4MHz
total time
i2c clock high speed code
i2c clock after high speed code
[ 51.686775] i2c_designware ffd71000.i2c: start1 stop, ns = 254166
[ 56.039020] i2c_designware ffd71000.i2c: start1 stop, ns = 246875
[ 57.918927] i2c_designware ffd71000.i2c: start1 stop, ns = 463021
[ 59.158680] i2c_designware ffd71000.i2c: start1 stop, ns = 247917
[ 60.326094] i2c_designware ffd71000.i2c: start1 stop, ns = 7567708
[ 61.662052] i2c_designware ffd71000.i2c: start1 stop, ns = 231771
[ 63.950131] i2c_designware ffd71000.i2c: start1 stop, ns = 245833
[ 65.494423] i2c_designware ffd71000.i2c: start1 stop, ns = 247396
[ 67.198170] i2c_designware ffd71000.i2c: start1 stop, ns = 246354
[ 68.816386] i2c_designware ffd71000.i2c: start1 stop, ns = 228125
[ 70.326513] i2c_designware ffd71000.i2c: start1 stop, ns = 275000
[ 71.678380] i2c_designware ffd71000.i2c: start1 stop, ns = 231771
[ 73.238112] i2c_designware ffd71000.i2c: start1 stop, ns = 266146
[ 74.709552] i2c_designware ffd71000.i2c: start1 stop, ns = 7543229
[ 76.239050] i2c_designware ffd71000.i2c: start1 stop, ns = 252083
[ 77.679114] i2c_designware ffd71000.i2c: start1 stop, ns = 237500
[ 79.646043] i2c_designware ffd71000.i2c: start1 stop, ns = 247917
[ 81.790254] i2c_designware ffd71000.i2c: start1 stop, ns = 251042
[ 83.407348] i2c_designware ffd71000.i2c: start1 stop, ns = 252084
i2c7 400KHz
total time
i2c clock
[ 44.523221] i2c_designware fdf0b000.i2c: start1 stop, ns = 497395
[ 50.323538] i2c_designware fdf0b000.i2c: start1 stop, ns = 497916
[ 52.339826] i2c_designware fdf0b000.i2c: start1 stop, ns = 533854
[ 53.906877] i2c_designware fdf0b000.i2c: start1 stop, ns = 500521
[ 67.225191] i2c_designware fdf0b000.i2c: start1 stop, ns = 511459
[ 70.417515] i2c_designware fdf0b000.i2c: start1 stop, ns = 529167
[ 71.641763] i2c_designware fdf0b000.i2c: start1 stop, ns = 506250
[ 72.684754] i2c_designware fdf0b000.i2c: start1 stop, ns = 527084
[ 73.929443] i2c_designware fdf0b000.i2c: start1 stop, ns = 501041
[ 74.980119] i2c_designware fdf0b000.i2c: start1 stop, ns = 523438
[ 77.494751] i2c_designware fdf0b000.i2c: start1 stop, ns = 535938
[ 78.757946] i2c_designware fdf0b000.i2c: start1 stop, ns = 511458
[ 79.992585] i2c_designware fdf0b000.i2c: start1 stop, ns = 522396
[ 81.257584] i2c_designware fdf0b000.i2c: start1 stop, ns = 508854
[ 82.417831] i2c_designware fdf0b000.i2c: start1 stop, ns = 639062
[ 83.429781] i2c_designware fdf0b000.i2c: start1 stop, ns = 479688
i2c7 1MHz
total time
i2c clock
[ 49.510011] i2c_designware fdf0b000.i2c: start1 stop, ns = 504167
[ 52.704952] i2c_designware fdf0b000.i2c: start1 stop, ns = 500000
[ 54.443930] i2c_designware fdf0b000.i2c: start1 stop, ns = 513021
[ 54.944797] i2c_designware fdf0b000.i2c: start1 stop, ns = 485938
[ 55.408585] i2c_designware fdf0b000.i2c: start1 stop, ns = 507292
[ 55.829922] i2c_designware fdf0b000.i2c: start1 stop, ns = 530208
[ 56.253792] i2c_designware fdf0b000.i2c: start1 stop, ns = 479688
[ 56.677975] i2c_designware fdf0b000.i2c: start1 stop, ns = 505729
[ 57.077421] i2c_designware fdf0b000.i2c: start1 stop, ns = 498438
[ 57.495315] i2c_designware fdf0b000.i2c: start1 stop, ns = 489583
[ 57.908306] i2c_designware fdf0b000.i2c: start1 stop, ns = 496875
[ 58.284071] i2c_designware fdf0b000.i2c: start1 stop, ns = 492188
[ 58.655032] i2c_designware fdf0b000.i2c: start1 stop, ns = 507812
[ 59.045591] i2c_designware fdf0b000.i2c: start1 stop, ns = 495313
[ 59.462766] i2c_designware fdf0b000.i2c: start1 stop, ns = 482813
[ 59.853630] i2c_designware fdf0b000.i2c: start1 stop, ns = 619792
[ 60.227959] i2c_designware fdf0b000.i2c: start1 stop, ns = 493229
[ 60.611995] i2c_designware fdf0b000.i2c: start1 stop, ns = 483854
[ 60.974365] i2c_designware fdf0b000.i2c: start1 stop, ns = 510938
[ 61.361875] i2c_designware fdf0b000.i2c: start1 stop, ns = 485416
[ 61.751419] i2c_designware fdf0b000.i2c: start1 stop, ns = 502083
[ 62.117700] i2c_designware fdf0b000.i2c: start1 stop, ns = 482813
[ 62.481843] i2c_designware fdf0b000.i2c: start1 stop, ns = 483333
[ 62.828989] i2c_designware fdf0b000.i2c: start1 stop, ns = 481250
[ 63.659298] i2c_designware fdf0b000.i2c: start1 stop, ns = 504167
[ 64.433775] i2c_designware fdf0b000.i2c: start1 stop, ns = 588542
[ 64.781809] i2c_designware fdf0b000.i2c: start1 stop, ns = 481771
[ 65.177401] i2c_designware fdf0b000.i2c: start1 stop, ns = 498959
[ 65.631850] i2c_designware fdf0b000.i2c: start1 stop, ns = 508334
[ 66.376915] i2c_designware fdf0b000.i2c: start1 stop, ns = 482292
[ 66.865511] i2c_designware fdf0b000.i2c: start1 stop, ns = 497917
[ 67.233225] i2c_designware fdf0b000.i2c: start1 stop, ns = 502605
[ 68.136095] i2c_designware fdf0b000.i2c: start1 stop, ns = 494270
[ 68.670543] i2c_designware fdf0b000.i2c: start1 stop, ns = 584375
[ 69.565803] i2c_designware fdf0b000.i2c: start1 stop, ns = 498437
[ 70.115527] i2c_designware fdf0b000.i2c: start1 stop, ns = 523958
[ 70.605061] i2c_designware fdf0b000.i2c: start1 stop, ns = 647917
[ 70.976543] i2c_designware fdf0b000.i2c: start1 stop, ns = 482291
[ 71.697409] i2c_designware fdf0b000.i2c: start1 stop, ns = 481770
i2c7 3.4MHz
total time
i2c clock high speed code
i2c clock after high speed code
[ 127.597756] i2c_designware fdf0b000.i2c: start1 stop, ns = 156771
[ 128.229081] i2c_designware fdf0b000.i2c: start1 stop, ns = 143229
[ 128.913613] i2c_designware fdf0b000.i2c: start1 stop, ns = 134896
[ 129.544570] i2c_designware fdf0b000.i2c: start1 stop, ns = 121354
[ 130.200572] i2c_designware fdf0b000.i2c: start1 stop, ns = 108334
[ 130.829496] i2c_designware fdf0b000.i2c: start1 stop, ns = 131250
[ 132.123481] i2c_designware fdf0b000.i2c: start1 stop, ns = 150521
[ 132.869800] i2c_designware fdf0b000.i2c: start1 stop, ns = 112500
[ 133.532167] i2c_designware fdf0b000.i2c: start1 stop, ns = 121354
[ 134.160844] i2c_designware fdf0b000.i2c: start1 stop, ns = 127083
[ 134.792397] i2c_designware fdf0b000.i2c: start1 stop, ns = 170313
[ 135.387614] i2c_designware fdf0b000.i2c: start1 stop, ns = 112500
[ 136.015207] i2c_designware fdf0b000.i2c: start1 stop, ns = 113542
[ 136.589023] i2c_designware fdf0b000.i2c: start1 stop, ns = 107813
[ 137.285048] i2c_designware fdf0b000.i2c: start1 stop, ns = 109375
[ 137.854421] i2c_designware fdf0b000.i2c: start1 stop, ns = 112500
[ 138.305443] i2c_designware fdf0b000.i2c: start1 stop, ns = 123438
[ 150.636947] i2c_designware fdf0b000.i2c: start1 stop, ns = 137500
[ 151.612569] i2c_designware fdf0b000.i2c: start1 stop, ns = 141666
[ 152.355146] i2c_designware fdf0b000.i2c: start1 stop, ns = 116666
[ 152.949107] i2c_designware fdf0b000.i2c: start1 stop, ns = 110937
[ 153.458803] i2c_designware fdf0b000.i2c: start1 stop, ns = 110937
[ 153.992739] i2c_designware fdf0b000.i2c: start1 stop, ns = 131250
[ 154.454351] i2c_designware fdf0b000.i2c: start1 stop, ns = 111458
[ 154.868485] i2c_designware fdf0b000.i2c: start1 stop, ns = 118750
[ 155.291879] i2c_designware fdf0b000.i2c: start1 stop, ns = 111458
[ 156.136523] i2c_designware fdf0b000.i2c: start1 stop, ns = 113020
[ 156.496287] i2c_designware fdf0b000.i2c: start1 stop, ns = 125000
From the above experiments, I found 1MHz seems abnormal, the speed is 400KHz
And also i2c0 for 3.4Mhz, after the high speed code, the clock is just 1MHz???
I change the i2c clock-frequency by change dtsi setting like as the below sample dtsi config.
&i2c0 {
/* On Low speed expansion */
label = “LS-i2c0”;
clock-frequency = <1000000>;
status = “okay”;
Is it possible to check it more about the clock setting??
PS: sorry for the picture links. It’s because of the forum limit for the newbie only can upload one picture.