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: Wed, 18 Aug 2021 12:19:34 +0800 [thread overview]
Message-ID: <6ed12f1a09fb1f3e6ebe05992a9232bc7c34213c.camel@codeconstruct.com.au> (raw)
In-Reply-To: <YRwkvjAuEd+9lTt7@robh.at.kernel.org>
On Tue, 2021-08-17 at 16:06 -0500, Rob Herring wrote:
On Mon, Aug 16, 2021 at 03:32:40PM +0800, Matt Johnston wrote:
> > .-------.
> > |eeprom |
> > .----------. .------. /'-------'
> > > adapter | | mux --@0,i2c5------'
> > > i2c1 |-.-| --@1,i2c6--.--.
> > > ..........| \'------' \ \ .........
> > > mctp-i2c | \ \ \ .mctpB .
> > > slave | \ \ '.0x30 .
> > > 0x50 | \ ......... \ '.......'
> > '----------' \ .mctpA . \ .........
> > '.0x1d . '.mctpC .
> > '.......' '.0x31 .
> > '.......'
> >
>
> I guess 'mctp-i2c' alone here is fine given it's the I2C controller
> slave implementation which is just a protocol. It's the external devices
> where my concern is.
>
> Though, don't you need a different compatible for it and external
> devices?
We are only defining a binding for the system's own MCTP "controller"
here, not the external devices on the other side of the I2C link. Those are
probed outside of DT, for example hotplug NVMe disks can expose MCTP-over-
I2C.
This ends up describing something like a network interface, which
happens to use I2C as a transport in this case. (There are other
transports like MCTP-over-serial, but those don't require DT topology
data). For other network-type DT bindings (say, ethernet@), we don't
describe remote network endpoints either, so we're proposing the same
pattern for MCTP.
> > reg = <(0x50 | I2C_OWN_SLAVE_ADDRESS)>;
> > attach-bus = <&i2c1 &i2c6>;
>
> Why do you need to say you are attached to yourself?
This indicates that the top-level MCTP controller needs to talk to MCTP
endpoints, eg mctpA on the directly attached bus i2c1. In some topologies
there will be no directly-attached endpoints, in which case we would omit
i2c1 from the list. We need to specify the attach-bus property since we
don't have a list of external device endpoints to walk.
[In the case of not directly attached, we still need to plant the mctp-i2c@
node at the root controller level, as the claimed client address (in reg)
is global across the entire bus. The attach-bus list gives us the set of
interfaces that are necessary for the OS to control]
> > Regarding I2C_OWN_SLAVE_ADDRESS validation
> You'll have to do a minimum/maximum range with the high bit set and
> addresses 0-7f.
OK, that will work fine for our binding. The general I2C slave client case
would also have to allow for I2C_TEN_BIT_ADDRESS (1<<31), but MCTP-over-I2C
only accepts 7 bit.
Thanks,
Matt
next prev parent reply other threads:[~2021-08-18 4:19 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
2021-08-17 21:06 ` Rob Herring
2021-08-18 4:19 ` Matt Johnston [this message]
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=6ed12f1a09fb1f3e6ebe05992a9232bc7c34213c.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).