From: Shiv Prakash Gupta <shivprakash.gupta@nxp.com>
To: andi.shyti@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, peda@lysator.liu.se,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: vikash.bansal@nxp.com, priyanka.jain@nxp.com,
Shiv Prakash Gupta <shivprakash.gupta@nxp.com>,
Conor Dooley <conor.dooley@microchip.com>
Subject: [PATCH v2 1/2] dt-bindings: i2c: Add NXP PCA9641 I2C bus master arbiter
Date: Thu, 17 Sep 2026 14:28:51 +0530 [thread overview]
Message-ID: <20260917085852.552079-2-shivprakash.gupta@nxp.com> (raw)
In-Reply-To: <20260917085852.552079-1-shivprakash.gupta@nxp.com>
Add device tree binding schema for the NXP PCA9641 2-to-1 I2C bus
master arbiter.
The PCA9641 arbitrates between two upstream I2C masters competing for a
single downstream slave bus using a lock/grant ownership model. The
binding supports an optional 'interrupts' property for interrupt-assisted
arbitration.
Signed-off-by: Shiv Prakash Gupta <shivprakash.gupta@nxp.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
Changes in v2:
- Add Acked-by from Conor Dooley (no functional changes to the binding).
.../devicetree/bindings/i2c/nxp,pca9641.yaml | 109 ++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9641.yaml
diff --git a/Documentation/devicetree/bindings/i2c/nxp,pca9641.yaml b/Documentation/devicetree/bindings/i2c/nxp,pca9641.yaml
new file mode 100644
index 000000000000..649a3f6d1776
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/nxp,pca9641.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/nxp,pca9641.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCA9641 2-to-1 I2C bus master arbiter
+
+maintainers:
+ - Shiv Prakash Gupta <shivprakash.gupta@nxp.com>
+
+description: |
+ The PCA9641 is a 2-to-1 I2C bus master arbiter that manages two upstream
+ I2C masters competing for a single downstream slave bus. It uses a
+ lock/grant ownership model: a master requests the downstream bus by setting
+ LOCK_REQ, waits for the arbiter to assert LOCK_GRANT, then explicitly
+ connects to the bus via BUS_CONNECT before issuing transactions.
+
+ Key features compared to the PCA9541:
+ - Lock/grant ownership model (LOCK_REQ + LOCK_GRANT bits in CONTR register)
+ - BUS_CONNECT bit must be set explicitly after receiving LOCK_GRANT
+ - Reserve Time register (RT): guarantees bus ownership for 1-255 ms
+ - INT0 and INT1 interrupt outputs (one per upstream master) and INT_IN
+ interrupt input that propagates downstream slave interrupts upstream
+ - 16-bit shared mailbox (MB_LO + MB_HI) for inter-master communication
+ - ID register (read-only, value 0x38) to distinguish from PCA9541
+ - Four address pins (AD0-AD3) allowing up to 112 unique I2C addresses
+
+properties:
+ compatible:
+ const: nxp,pca9641
+
+ reg:
+ maxItems: 1
+ description:
+ 7-bit I2C slave address of the PCA9641 on the upstream bus. The address
+ is set by hardware pins AD0-AD3 at power-on or hardware reset.
+
+ interrupts:
+ maxItems: 1
+ description:
+ Optional interrupt from the INT0 or INT1 output pin. When provided the
+ driver uses interrupt-assisted arbitration (waits on LOCK_GRANT interrupt)
+ instead of polling the CONTR register. Either INT0 or INT1 can be
+ connected depending on which upstream master port is used.
+
+ i2c-arb:
+ type: object
+ $ref: /schemas/i2c/i2c-controller.yaml
+ unevaluatedProperties: false
+ description:
+ I2C bus node representing the downstream slave bus controlled by the
+ PCA9641. Downstream slave devices are declared as child nodes here.
+
+required:
+ - compatible
+ - reg
+ - i2c-arb
+
+additionalProperties: false
+
+examples:
+ - |
+ /* Minimal example: polling mode (no interrupt wiring) */
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c-arbiter@74 {
+ compatible = "nxp,pca9641";
+ reg = <0x74>;
+
+ i2c-arb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@50 {
+ compatible = "atmel,24c32";
+ reg = <0x50>;
+ };
+ };
+ };
+ };
+
+ - |
+ /* Interrupt mode: INT0 wired to SoC GPIO */
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c-arbiter@70 {
+ compatible = "nxp,pca9641";
+ reg = <0x70>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
+
+ i2c-arb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ temperature-sensor@48 {
+ compatible = "national,lm75";
+ reg = <0x48>;
+ };
+ };
+ };
+ };
--
2.34.1
next prev parent reply other threads:[~2026-09-17 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 8:58 [PATCH v2 0/2] Add NXP PCA9641 I2C bus master arbiter support Shiv Prakash Gupta
2026-09-17 8:58 ` Shiv Prakash Gupta [this message]
2026-09-17 8:58 ` [PATCH v2 2/2] i2c: mux: Add NXP PCA9641 I2C bus master arbiter driver Shiv Prakash Gupta
2026-09-17 9:10 ` sashiko-bot
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=20260917085852.552079-2-shivprakash.gupta@nxp.com \
--to=shivprakash.gupta@nxp.com \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@lysator.liu.se \
--cc=priyanka.jain@nxp.com \
--cc=robh@kernel.org \
--cc=vikash.bansal@nxp.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