Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

XenuIsWatching
Copy link
Member

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.

dcpleung
dcpleung previously approved these changes Mar 21, 2025
Comment on lines 789 to 800
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;
}
Copy link
Member Author

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

Comment on lines +71 to +74
v1p0-support:
type: boolean
description: |
Indicates if the device compiles to I3C v1.0.
Copy link
Member

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 ?

Copy link
Member Author

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.

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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants