-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: i3c: add i3c v1.0 support #87448
base: main
Are you sure you want to change the base?
Conversation
drivers/i3c/i3c_common.c
Outdated
if (((target->flags & I3C_V1P0_SUPPORT) && (target->bcr & I3C_BCR_ADV_CAPABILITIES)) || | ||
(!(target->flags & I3C_V1P0_SUPPORT))) { | ||
/* | ||
* GETCAPS (GETHDRCAP) is required to be supported for I3C v1.0 targets that support | ||
* HDR modes and required if the Target's I3C version is v1.1 or later. | ||
*/ | ||
ret = i3c_ccc_do_getcaps_fmt1(target, &caps); | ||
if (ret != 0) { | ||
return ret; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thinking more about this, i may need to add condition here as if an unknown v1.0 device is reported through DEFTGTS, it will get the info and then fail here, as it cannot know ahead of time if it is a v1.0 device
v1p0-support: | ||
type: boolean | ||
description: | | ||
Indicates if the device compiles to I3C v1.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this need to be a property in DT? isn't it already determinable by compat ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is not. You'd have to read the datasheet of the part to see what spec version it compiles.
b83dfca
to
17748a2
Compare
This adds a v1.0 support dts flag for devices. This also makes it so it doesn't try to send a GETCAPS (GETHDRCAP) ccc if this flag is set and it doesn't support any HDR modes. Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
17748a2
to
b023155
Compare
In I3C v1.0, there was a RSTDAA direct CCC. It is deprecated in I3C v1.1 and later. This adds a CCC helper for it. Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This adds a shell helper for a direct rstdaa for I3C v1.0 devices Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
b023155
to
402e928
Compare
I3C v1.0 does have few quirks with it. Such as supporting a direct RSTDAA as well as using GETHDRCAP.
This adds a devicetree flag to indicate support of v1.0. This resuses the same "bool" that support_setaasa used and turns it in to a flag byte.