lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250318103622.29979-1-j-choudhary@ti.com>
Date: Tue, 18 Mar 2025 16:06:20 +0530
From: Jayesh Choudhary <j-choudhary@...com>
To: <vigneshr@...com>, <andi.shyti@...nel.org>, <robh@...nel.org>,
        <krzk+dt@...nel.org>, <conor+dt@...nel.org>,
        <linux-kernel@...r.kernel.org>
CC: <aaro.koskinen@....fi>, <andreas@...nade.info>, <khilman@...libre.com>,
        <rogerq@...nel.org>, <tony@...mide.com>, <jmkrzyszt@...il.com>,
        <linux-omap@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <j-choudhary@...com>
Subject: [PATCH 0/2] Add support for setting MUX for I2C lines

These 2 patches add support for mux-controller for I2C lines as required
in TI SoC J721S2 for main_i2c3 instance where the I2C lines after coming
out of SoC are routed through a MUX which is controlled by WKUP_GPIO54:

______                     MUX FOR I2C
      | SOM_I2C3_SCL    __ FOR DATA AND CLK LANES
 S    |----------------|  |--------------+-------------+-----I2C3_SCL
 O    |----------------|__|------------+-|-----------+-|-----I2C3_SDA
 M    | SOM_I2C3_SDA    |              | |           | |
______|                 |              | |           | |
                        |              | |           | |
                   WKUP_GPIO0_54     __|_|__       __|_|__
                                    |       |     |       |
                                    |       |     |       |
                                    |_______|     |_______|
                                     TCA6408       PCM3168

Setting GPIO hog for WKUP_GPIO54 is not enough as I2C and TCA6408 drivers
probe before the GPIO is hogged and since the I2C lines are not actually
high, I2C transactions for PCA953X driver fail which in turns result in
deferred probe for other peripherals like audio. I2C recovers after this
failed transaction but PCA953X is not probed again.

We get the following errors:

[...]

[    1.293131] pca953x 2-0020: supply vcc not found, using dummy regulator
[    1.299971] pca953x 2-0020: using no AI
[    1.318993] pca953x 2-0020: failed writing register: -121
[    1.324599] pca953x 2-0020: probe with driver pca953x failed with error -121

[...]

[   21.191584] i2c 2-0044: deferred probe pending: i2c: supplier 2-0020 not ready
[   21.198855] platform sound: deferred probe pending: j721e-audio: devm_snd_soc_register_card() failed: -517

So add mux-control in I2C driver to defer the I2C probe till WKUP_GPIO54 is
hogged to desired state and then continue with I2C probe.

Jayesh Choudhary (2):
  dt-bindings: i2c: omap: Add mux-states property
  i2c: omap: Add support for setting mux

 .../devicetree/bindings/i2c/ti,omap4-i2c.yaml |  6 +++++
 drivers/i2c/busses/Kconfig                    |  1 +
 drivers/i2c/busses/i2c-omap.c                 | 22 +++++++++++++++++++
 3 files changed, 29 insertions(+)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ