From: Matt Johnston <matt@codeconstruct.com.au>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org, Wolfram Sang <wsa@kernel.org>,
Jeremy Kerr <jk@codeconstruct.com.au>
Subject: Re: [RFC PATCH v2 0/2] MCTP I2C devicetree binding
Date: Mon, 16 Aug 2021 15:32:40 +0800 [thread overview]
Message-ID: <0400d77489ba5350aefe576b91afb52cff3ebb48.camel@codeconstruct.com.au> (raw)
In-Reply-To: <YRae8tDReDS67sM4@robh.at.kernel.org>
On Fri, 2021-08-13 at 11:33 -0500, Rob Herring wrote:
>
> Adding 'generic' is not an improvement nor does it change anything.
I may have misunderstood the feedback then:
> Again, a protocol is not a device. We went thru the same thing with
> HID-over-I2C.
Thanks for the pointer to HID-over-I2C, that helps to clarify things.
I'm a still a little unclear on what you mean by "protocol" - is that a
DT-specific thing? If so, I can't see many references to what's required
for a protocol definition - do you have any pointers I can read up on?
I don't expect for there to be much extra in the way of I2C controller
quirks that we'll need, but I agree that we may need to accommodate
those in future. It looks like the HID example gives us a bit
of a precedent there - is that just through allowing further, more
specific compatible values later? (plus their binding-specified properties)
Essentially at the moment we just need to flag which busses will need
to carry MCTP data, and this should work with any I2C controller. To do
that, this new binding defines which I2C busses in the system will be
accessible by MCTP and which local I2C client address will be used. If
there's a neater way to represent those in the DT we're happy to rework
the binding.
(MCTP I2C uses SMBus Block Write for messages in either direction. This
requires us to include the mux topology in the DT data so the system can
receive response messages. However all we need from the DT binding is to
flag the nodes in the tree that will host endpoints - a driver
implementation can work out the rest)
> There's still not any diagram to better understand what all this is.
I'll add one to 2/2, how's something like this:
.-------.
|eeprom |
.----------. .------. /'-------'
| adapter | | mux --@0,i2c5------'
| i2c1 |-.-| --@1,i2c6--.--.
|..........| \'------' \ \ .........
| mctp-i2c | \ \ \ .mctpB .
| slave | \ \ '.0x30 .
| 0x50 | \ ......... \ '.......'
'----------' \ .mctpA . \ .........
'.0x1d . '.mctpC .
'.......' '.0x31 .
'.......'
This shows 3 MCTP peripherals in the system, one toplevel and two
behind a mux. This requires us to define two MCTP controllers: one
on i2c1 - the root controller, and one in i2c6 - an individual
downstream port of the mux.
i2c1: i2cbus1 {
compatible = "vendor,example-i2c-controller";
#address-cells = <1>;
#size-cells = <0>;
mctp@50 {
compatible = "mctp-i2c";
reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
attach-bus = <&i2c1 &i2c6>;
};
};
i2cmux0 {
compatible = "vendor,example-i2c-mux";
#address-cells = <1>;
#size-cells = <0>;
i2c-parent = <&i2c1>;
i2c5: i2c@0 {
reg = <0>;
eeprom@33 {
compatible = "atmel,24c64";
reg = <0x33>;
};
};
i2c6: i2c@1 {
reg = <1>;
};
};
Regarding I2C_OWN_SLAVE_ADDRESS validation, I can add a i2c-own-
address.yaml schema (name pending) though can't see a way to perform a bit-
set test in json schema validation?
Thanks,
Matt
next prev parent reply other threads:[~2021-08-16 7:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 3:43 [RFC PATCH v2 0/2] MCTP I2C devicetree binding Matt Johnston
2021-08-11 3:43 ` [RFC PATCH v2 1/2] dt-bindings: net: New binding for mctp-i2c-generic Matt Johnston
2021-08-12 12:19 ` Rob Herring
2021-08-11 3:43 ` [RFC PATCH v2 2/2] dt-bindings: net: mctp-i2c-generic: support muxes Matt Johnston
2021-08-13 16:33 ` [RFC PATCH v2 0/2] MCTP I2C devicetree binding Rob Herring
2021-08-16 7:32 ` Matt Johnston [this message]
2021-08-17 21:06 ` Rob Herring
2021-08-18 4:19 ` Matt Johnston
2021-08-20 19:25 ` Rob Herring
2021-08-23 7:51 ` Jeremy Kerr
2021-08-23 16:16 ` Rob Herring
2021-08-26 2:27 ` Matt Johnston
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=0400d77489ba5350aefe576b91afb52cff3ebb48.camel@codeconstruct.com.au \
--to=matt@codeconstruct.com.au \
--cc=devicetree@vger.kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=robh@kernel.org \
--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).