mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] i2c: jz4780: Program the spike filter, add the X1600
@ 2026-10-24 21:25 Olivier Louvignes
  2026-10-24 21:25 ` [PATCH v2 1/2] i2c: jz4780: Program the spike suppression length Olivier Louvignes
  2026-10-24 21:25 ` [PATCH v2 2/2] dt-bindings: i2c: ingenic,i2c: Add the X1600 Olivier Louvignes
  0 siblings, 2 replies; 5+ messages in thread
From: Olivier Louvignes @ 2026-10-24 21:25 UTC (permalink / raw)
  To: Andi Shyti
  Cc: Paul Cercueil, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	H . Nikolaus Schaller, linux-i2c, devicetree, linux-mips,
	linux-kernel, Olivier Louvignes

v1 said the X1600 moved the SDA set-up register from 0x94 to 0xa0. It
didn't: as Nikolaus pointed out from the programming manuals, SDASU is
at 0x94 on the X1000, X1830 and X1600 alike, and 0xa0 is the spike
suppression length. v1 worked by accident, by writing the set-up value
into the spike filter.

What was wrong on the HiBy R1: started from the vendor kernel, the
filter held 116 APB cycles, longer than SCL's high period at 400 kHz
(102 cycles at 140 MHz), and every transfer lost arbitration. Setting
the filter by hand before single reads, transfers work from 1 to 100
cycles and fail from 110 up, whatever SDASU holds (1 to 100 tried). A
cold boot leaves it at its reset value of 1 and works.

So patch 1 programs the filter for every X1000-class SoC, to the 50 ns
of the I2C specification, and the X1600 needs no driver change: patch 2
adds its compatible with a fallback to ingenic,x1000-i2c.

Changes since v1:
- Replace "Add support for the X1600" (wrong register) with a fix to
  the spike filter for all X1000-class SoCs.
- The binding now falls back to ingenic,x1000-i2c.
- Rebased on i2c/i2c-next.

v1: https://lore.kernel.org/all/20261023081452.44118-1-olivier@mgcrea.io/

Olivier Louvignes (2):
  i2c: jz4780: Program the spike suppression length
  dt-bindings: i2c: ingenic,i2c: Add the X1600

 .../devicetree/bindings/i2c/ingenic,i2c.yaml         |  3 +++
 drivers/i2c/busses/i2c-jz4780.c                      | 12 ++++++++++++
 2 files changed, 15 insertions(+)


base-commit: 03a5cffc818695157414456dec695f7c30b9ffff
--
2.39.5


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-26  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-24 21:25 [PATCH v2 0/2] i2c: jz4780: Program the spike filter, add the X1600 Olivier Louvignes
2026-10-24 21:25 ` [PATCH v2 1/2] i2c: jz4780: Program the spike suppression length Olivier Louvignes
2026-10-24 21:25 ` [PATCH v2 2/2] dt-bindings: i2c: ingenic,i2c: Add the X1600 Olivier Louvignes
2026-10-26  8:06   ` Krzysztof Kozlowski
2026-10-26  9:54     ` Andi Shyti

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®