Skip to content

Conversation

mahkurap
Copy link
Collaborator

@mahkurap mahkurap commented Aug 7, 2025

Add support to configure the Max Read Length and Max Write Length for each i3c device using device tree tags.

mahkurap added 10 commits August 4, 2025 17:48
Add device tree tags to configure device specific max read lenth
and max write lengths.

Example usage in Device Tree:

    scoob_p0: scoob@5c,22400002118 {
            reg = <0x5c 0x224 0x00002118>;
            assigned-address = <0x5c>;
            mrl = <69>;
            mwl = <69>;
    };

tested: verified on Morocco

Signed-off-by: Mahesh Kurapati <[email protected]>
Add support for two new Device Tree properties, `mrl` (Maximum Read
Length) and `mwl` (Maximum Write Length), for I3C target devices.

These properties allow firmware to specify the maximum read and write
transfer lengths supported by a target, as defined in the I3C
specification. The values are used by the BMC/I3C master to send SETMRL
and SETMWL CCC commands the target initialization/probe. BMC retrieves
the effective values using GETMRL and GETMWL CCC commands. These values
are then used to during the private transfers.

Example usage in Device Tree:

    scoob_p0: scoob@5c,22400002118 {
        reg = <0x5c 0x224 0x00002118>;
        assigned-address = <0x5c>;
        mrl = <69>;
        mwl = <69>;
    };

tested: verified on Morocco

Signed-off-by: Mahesh Kurapati <[email protected]>
Add `mrl` (Maximum Read Length) and `mwl` (Maximum Write Length)
properties to the Congo I3C device node in the Aspeed device tree.

These properties are defined by the I3C specification and indicate
the maximum read and write transfer lengths supported by the target
device. Setting both values to 69 bytes allows the I3C master to
optimize private data transfers accordingly.

tested: verified on Congo

Signed-off-by: Mahesh Kurapati <[email protected]>
Add `mrl` (Maximum Read Length) and `mwl` (Maximum Write Length)
properties to the Ghana I3C device node in the Aspeed device tree.

These properties are defined by the I3C specification and indicate
the maximum read and write transfer lengths supported by the target
device.

tested: build verified for Ghana

Signed-off-by: Mahesh Kurapati <[email protected]>
Add `mrl` (Maximum Read Length) and `mwl` (Maximum Write Length)
properties to the Kenya I3C device node in the Aspeed device tree.

These properties are defined by the I3C specification and indicate
the maximum read and write transfer lengths supported by the target
device.

tested: verified on Kenya

Signed-off-by: Mahesh Kurapati <[email protected]>
Add `mrl` (Maximum Read Length) and `mwl` (Maximum Write Length)
properties to the Morocco I3C device node in the Aspeed device tree.

These properties are defined by the I3C specification and indicate
the maximum read and write transfer lengths supported by the target
device.

tested: verified on Morocco

Signed-off-by: Mahesh Kurapati <[email protected]>
Add `mrl` (Maximum Read Length) and `mwl` (Maximum Write Length)
properties to the Nigeria I3C device node in the Aspeed device tree.

These properties are defined by the I3C specification and indicate
the maximum read and write transfer lengths supported by the target
device.

tested: verified on Nigeria

Signed-off-by: Mahesh Kurapati <[email protected]>
correct the static address of the SCOOB device in Socket-1/iod0.

tested: verified on Morocco

Signed-off-by: Mahesh Kurapati <[email protected]>
correct the static address of the SCOOB device in Socket-1/iod0.

tested: verified on Nigeria

Signed-off-by: Mahesh Kurapati <[email protected]>
correct the static address of the SCOOB device in Socket-1/iod0.

tested: verified on Ghana

Signed-off-by: Mahesh Kurapati <[email protected]>

if (!of_property_read_u32(node, "mwl", &mwl))
boardinfo->mwl = (u16)mwl;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a default value for mwl? and set it in else statement

@@ -2658,6 +2667,12 @@ of_i3c_master_add_i3c_boardinfo(struct i3c_master_controller *master,
if (!of_property_read_u8(node, "bcr", &bcr))
boardinfo->bcr = bcr;

if (!of_property_read_u32(node, "mrl", &mrl))
boardinfo->mrl = (u16)mrl;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a default value for mrl? and set it in else statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants