-
Notifications
You must be signed in to change notification settings - Fork 746
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
[dv,spi] Set strong drive strength and fast slew rate for SPI pads #24577
base: master
Are you sure you want to change the base?
Conversation
CI has the following error:
Code: opentitan/sw/device/lib/dif/dif_pinmux.c Lines 307 to 309 in 7e34e67
This only happens in the |
It's happening in all FPGA configurations because these pad attributes are not available. Pad attributes should not be written without proper matching against the configuration. |
@@ -1454,6 +1454,48 @@ bool test_main(void) { | |||
if (kDeviceType == kDeviceSimDV || kDeviceType == kDeviceSimVerilator) { | |||
configure_pinmux_sim(); | |||
} | |||
|
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.
These should probably be moved to be inside the configure_pinmux_sim()
function.
Signed-off-by: Sharon Topaz <[email protected]> [dv,spi] fix lint issues Signed-off-by: Sharon Topaz <[email protected]> [dv,spi] Add kDeviceSimDV, kDeviceSilicon constraints Signed-off-by: Sharon Topaz <[email protected]> [dv,spi] Add kDeviceSimDV, kDeviceSilicon constraints to power virus Signed-off-by: Sharon Topaz <[email protected]>
CHECK_DIF_OK( | ||
dif_pinmux_pad_write_attrs(&pinmux, kTopEarlgreyDirectPadsSpiHost0Sd0, | ||
kDifPinmuxPadKindDio, in_attr, &out_attr)); | ||
CHECK_DIF_OK( | ||
dif_pinmux_pad_write_attrs(&pinmux, kTopEarlgreyDirectPadsSpiHost0Sd1, | ||
kDifPinmuxPadKindDio, in_attr, &out_attr)); | ||
|
||
CHECK_DIF_OK( | ||
dif_pinmux_pad_write_attrs(&pinmux, kTopEarlgreyDirectPadsSpiHost0Sd2, | ||
kDifPinmuxPadKindDio, in_attr, &out_attr)); | ||
|
||
CHECK_DIF_OK( | ||
dif_pinmux_pad_write_attrs(&pinmux, kTopEarlgreyDirectPadsSpiHost0Sd3, | ||
kDifPinmuxPadKindDio, in_attr, &out_attr)); | ||
// Spi_Device |
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.
Aren't these attributes already set on the SPI Host 0 data pins? See lines 580 -- 601 in this file. Unless I am missing something here?
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.
I think lines 580-601 only set pull up and not drive strength/slew rate.
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.
sure, but can you merge this config with the lines I mentioned above? So we don't set the attributes twice?
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.
I tried, but dif_pinmux_pad_attr_flags
opentitan/sw/device/lib/dif/dif_pinmux.h
Line 140 in ae8ac57
typedef enum dif_pinmux_pad_attr_flags { |
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.
The slew rate is an attribute, not an attribute flag:
opentitan/sw/device/lib/dif/dif_pinmux.h
Line 158 in ae8ac57
dif_pinmux_pad_slew_rate_t slew_rate; |
@sha-ron should this change be eventually cherry-picked over to the |
Yes, it should be merged also to earlgrey_1.0.0 branch (it is required for GLS simulation). |
SPI pads should use strong drive strength and fast slew rate.