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: display: st7789v: Add ready time to startup #85023

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions drivers/display/display_st7789v.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct st7789v_config {
uint8_t rgb_param[3];
uint16_t height;
uint16_t width;
uint8_t ready_time_ms;
};

struct st7789v_data {
Expand Down Expand Up @@ -409,6 +410,8 @@ static int st7789v_init(const struct device *dev)
return -ENODEV;
}

k_sleep(K_TIMEOUT_ABS_MS(config->ready_time_ms));

ret = st7789v_reset_display(dev);
if (ret < 0) {
LOG_ERR("Failed to reset display (%d)", ret);
Expand Down Expand Up @@ -496,6 +499,7 @@ static DEVICE_API(display, st7789v_api) = {
.rgb_param = DT_INST_PROP(inst, rgb_param), \
.width = DT_INST_PROP(inst, width), \
.height = DT_INST_PROP(inst, height), \
.ready_time_ms = DT_INST_PROP(inst, ready_time_ms), \
}; \
\
static struct st7789v_data st7789v_data_ ## inst = { \
Expand Down
8 changes: 8 additions & 0 deletions dts/bindings/display/sitronix,st7789v.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,13 @@ properties:
required: true
description: RGB Interface Control Parameter

ready-time-ms:
type: int
default: 40
description: |
Time it takes for the device from power up to become responsive and
accepting commands. Defaults to 40ms (found by trial and error) if not
provided.

mipi-mode:
required: true
Loading