-
Notifications
You must be signed in to change notification settings - Fork 1.6k
i3c_controller: Remove CLK_MOD, set SDA low at Stop, add address width parameters #1724
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 tasks
5f8af7b
to
afa3621
Compare
Running the core at 50MHz, even though works, provide worst performance and improper stall times. The target carrier, DE10Nano, can be configured to provide a clk near 100MHz without using a PLL. Therefore, remove this option and require 100MHz input clock. Also, simplify logic to hold SDA lane always to ground during the bit, avoiding conditions where SDA rises before SCL, not yielding a proper stop bit. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
These values affect considerably the resource utilization, therefore, make them user-configurable. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Set interrupt pending on source signal rising edge, to allow clearing it and then resolving, e.g.: static irqreturn_t adi_i3c_controller_irq(int irq, void *data) { struct adi_i3c_controller *controller = data; u32 pending; pending = readl_relaxed(controller->regs + REG_IRQ_PENDING); writel_relaxed(pending, controller->regs + REG_IRQ_PENDING); if (pending & IRQ_PENDING_CMDR_PENDING) { spin_lock(&controller->xferqueue.lock); adi_i3c_controller_end_xfer_locked(controller, pending); spin_unlock(&controller->xferqueue.lock); } if (pending & IRQ_PENDING_IBI_PENDING) adi_i3c_controller_demux_ibis(controller); if (pending & IRQ_PENDING_DAA_PENDING) adi_i3c_controller_handle_da_req(controller); return IRQ_HANDLED; } Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Extending the signal until the sdo byte (dynamic address) is written is useful to debug the logic. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
afa3621
to
43f766d
Compare
library/i3c_controller/i3c_controller_host_interface/i3c_controller_regmap.vh
Show resolved
Hide resolved
IuliaCMoldovan
approved these changes
Jul 25, 2025
These registers are only used to conform with the specifications and may be read by the controller's driver. Neither have an effect on the operation of the controller. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
Following the proposed guidelines, release stable version Signed-off-by: Jorge Marques <jorge.marques@analog.com>
275716f
to
59eb6a5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Running the core at 50MHz, even though works, provide worst performance and improper stall times.
The target carrier, DE10Nano, can be configured to provide a clk near 100MHz without using a PLL.
Therefore, remove this option and require 100MHz input clock. Also, simplify logic to hold SDA lane always to ground during the bit, avoiding conditions where SDA rises before SCL, not yielding a proper stop bit.
Add address width parameters, because these values affect considerably the resource utilization, therefore, make them user-configurable.
non-sticky interrupt pending
Set interrupt pending on source signal rising edge, to allow clearing
it and then resolving, e.g.:
Breaking change because removes an user set parameter.
This was tested on hardware by me and a third-party
PR Type
PR Checklist