From: Matt Johnston <matt@codeconstruct.com.au>
To: devicetree@vger.kernel.org
Cc: Wolfram Sang <wsa@kernel.org>,
Jeremy Kerr <jk@codeconstruct.com.au>,
Matt Johnston <matt@codeconstruct.com.au>
Subject: [RFC PATCH 2/2] dt-bindings: net: Add mctp-i2c bus-attach property
Date: Mon, 2 Aug 2021 12:04:58 +0800 [thread overview]
Message-ID: <20210802040458.334732-3-matt@codeconstruct.com.au> (raw)
In-Reply-To: <20210802040458.334732-1-matt@codeconstruct.com.au>
Allows attaching multiple child busses in a mux topology
to an mctp-i2c instance on the root bus. In general I2C
slave mode does not make sense for mux busses, but the MCTP
request/response protocol means the the root can switch
between child muxes for incoming I2C messages.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
---
.../devicetree/bindings/net/mctp-i2c.yaml | 42 +++++++++++++++++--
1 file changed, 38 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/mctp-i2c.yaml b/Documentation/devicetree/bindings/net/mctp-i2c.yaml
index f9378cd845d4..45429cbcc6a1 100644
--- a/Documentation/devicetree/bindings/net/mctp-i2c.yaml
+++ b/Documentation/devicetree/bindings/net/mctp-i2c.yaml
@@ -12,11 +12,10 @@ maintainers:
description:
The MCTP I2C binding defines an MCTP endpoint on the I2C bus to
communicate with I2C peripherals using MCTP (DMTF specification DSP0237).
-
- An mctp-i2c device must be attached to a hardware bus adapter which supports
+ A single binding node can attach to multiple child busses in a mux topology.
+ An mctp-i2c node's parent must be a hardware bus adapter which supports
slave functionality. The reg address must include I2C_OWN_SLAVE_ADDRESS.
-
properties:
compatible:
const: mctp-i2c
@@ -24,6 +23,17 @@ properties:
reg:
maxItems: 1
+ bus-attach:
+ $ref: "/schemas/types.yaml#/definitions/phandle-array"
+ description: |
+ List of phandles of I2C busses to attach to. I2C mux busses may only
+ be attached to an mctp-i2c binding on their parent root adapter in the
+ mux topology.
+ If no bus-attach property is specified then only the direct parent
+ I2C bus is attached. Otherwise to include a direct parent bus it
+ must be included in the bus-attach list if needed.
+
+
additionalProperties: true
required:
@@ -33,12 +43,36 @@ required:
examples:
- |
#include <dt-bindings/i2c/i2c.h>
- i2c {
+
+ // simple attaching to a root adapter i2c0
+ i2c0: i2cbus0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mctp@50 {
+ compatible = "mctp-i2c";
+ reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
+ };
+ };
+
+ // attaching to a root adapter i2c5 and a child mux bus i2c14
+ i2c5: i2cbus5 {
#address-cells = <1>;
#size-cells = <0>;
mctp@50 {
compatible = "mctp-i2c";
reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
+ attach-bus = <&i2c5 &i2c14>;
};
};
+
+ i2cmux0 {
+ compatible = "i2c-mux-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ i2c-parent = <&i2c0>;
+ i2c14: i2c@5 {
+ reg = <0>;
+ };
+ };
--
2.30.2
next prev parent reply other threads:[~2021-08-02 4:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 4:04 [RFC PATCH 0/2] MCTP I2C devicetree binding Matt Johnston
2021-08-02 4:04 ` [RFC PATCH 1/2] dt-bindings: net: New binding for mctp-i2c Matt Johnston
2021-08-02 16:45 ` Rob Herring
2021-08-11 3:39 ` Matt Johnston
2021-08-13 16:29 ` Rob Herring
2021-08-02 4:04 ` Matt Johnston [this message]
2021-08-02 13:39 ` [RFC PATCH 2/2] dt-bindings: net: Add mctp-i2c bus-attach property Rob Herring
2021-08-02 19:26 ` Rob Herring
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=20210802040458.334732-3-matt@codeconstruct.com.au \
--to=matt@codeconstruct.com.au \
--cc=devicetree@vger.kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=wsa@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).