Lines Matching +full:hsync +full:- +full:len

4  * SPDX-License-Identifier: Apache-2.0
70 const struct device *dev = (struct device *)p_args->p_context; in mipi_dsi_callback()
71 struct mipi_dsi_renesas_ra_data *data = dev->data; in mipi_dsi_callback()
73 switch (p_args->event) { in mipi_dsi_callback()
75 if (MIPI_DSI_SEQUENCE_STATUS_DESCRIPTORS_FINISHED == p_args->tx_status) { in mipi_dsi_callback()
76 data->message_sent = true; in mipi_dsi_callback()
81 data->fatal_error = true; in mipi_dsi_callback()
93 struct mipi_dsi_renesas_ra_data *data = dev->data; in mipi_dsi_renesas_ra_attach()
94 mipi_dsi_cfg_t cfg = data->mipi_dsi_cfg; in mipi_dsi_renesas_ra_attach()
97 if (!(mdev->mode_flags & MIPI_DSI_MODE_VIDEO)) { in mipi_dsi_renesas_ra_attach()
99 return -ENOTSUP; in mipi_dsi_renesas_ra_attach()
102 cfg.num_lanes = mdev->data_lanes; in mipi_dsi_renesas_ra_attach()
103 if (mdev->pixfmt == MIPI_DSI_PIXFMT_RGB888) { in mipi_dsi_renesas_ra_attach()
105 } else if (mdev->pixfmt == MIPI_DSI_PIXFMT_RGB565) { in mipi_dsi_renesas_ra_attach()
108 cfg.horizontal_active_lines = mdev->timings.hactive; in mipi_dsi_renesas_ra_attach()
109 cfg.horizontal_front_porch = mdev->timings.hfp; in mipi_dsi_renesas_ra_attach()
110 cfg.horizontal_back_porch = mdev->timings.hbp; in mipi_dsi_renesas_ra_attach()
111 cfg.horizontal_sync_lines = mdev->timings.hsync; in mipi_dsi_renesas_ra_attach()
113 cfg.vertical_active_lines = mdev->timings.vactive; in mipi_dsi_renesas_ra_attach()
114 cfg.vertical_front_porch = mdev->timings.vfp; in mipi_dsi_renesas_ra_attach()
115 cfg.vertical_back_porch = mdev->timings.vbp; in mipi_dsi_renesas_ra_attach()
116 cfg.vertical_sync_lines = mdev->timings.vsync; in mipi_dsi_renesas_ra_attach()
118 ret = R_MIPI_DSI_Open(&data->mipi_dsi_ctrl, &cfg); in mipi_dsi_renesas_ra_attach()
121 return -EIO; in mipi_dsi_renesas_ra_attach()
124 ret = R_MIPI_DSI_Start(&data->mipi_dsi_ctrl); in mipi_dsi_renesas_ra_attach()
127 return -EIO; in mipi_dsi_renesas_ra_attach()
136 struct mipi_dsi_renesas_ra_data *data = dev->data; in mipi_dsi_renesas_ra_transfer()
137 ssize_t len; in mipi_dsi_renesas_ra_transfer() local
139 uint8_t combined_tx_buffer[msg->tx_len + 1]; in mipi_dsi_renesas_ra_transfer()
141 combined_tx_buffer[0] = msg->cmd; in mipi_dsi_renesas_ra_transfer()
142 memcpy(&combined_tx_buffer[1], msg->tx_buf, msg->tx_len); in mipi_dsi_renesas_ra_transfer()
146 .cmd_id = msg->type, in mipi_dsi_renesas_ra_transfer()
148 .tx_len = msg->tx_len + 1, in mipi_dsi_renesas_ra_transfer()
151 data->message_sent = false; in mipi_dsi_renesas_ra_transfer()
152 data->fatal_error = false; in mipi_dsi_renesas_ra_transfer()
154 switch (msg->type) { in mipi_dsi_renesas_ra_transfer()
157 return -ENOTSUP; in mipi_dsi_renesas_ra_transfer()
161 ret = R_MIPI_DSI_Command(&data->mipi_dsi_ctrl, &fsp_msg); in mipi_dsi_renesas_ra_transfer()
164 return -EIO; in mipi_dsi_renesas_ra_transfer()
166 while (!(data->message_sent)) { in mipi_dsi_renesas_ra_transfer()
167 if (data->fatal_error) { in mipi_dsi_renesas_ra_transfer()
169 return -EIO; in mipi_dsi_renesas_ra_transfer()
172 len = msg->tx_len; in mipi_dsi_renesas_ra_transfer()
175 LOG_ERR("Unsupported message type (%d)", msg->type); in mipi_dsi_renesas_ra_transfer()
176 return -ENOTSUP; in mipi_dsi_renesas_ra_transfer()
179 return len; in mipi_dsi_renesas_ra_transfer()
189 const struct mipi_dsi_renesas_ra_config *config = dev->config; in mipi_dsi_renesas_ra_init()
190 struct mipi_dsi_renesas_ra_data *data = dev->data; in mipi_dsi_renesas_ra_init()
193 if (!device_is_ready(config->clock_dev)) { in mipi_dsi_renesas_ra_init()
195 return -ENODEV; in mipi_dsi_renesas_ra_init()
198 ret = clock_control_on(config->clock_dev, in mipi_dsi_renesas_ra_init()
199 (clock_control_subsys_t)&config->clock_dsi_subsys); in mipi_dsi_renesas_ra_init()
205 config->irq_configure(); in mipi_dsi_renesas_ra_init()
206 data->mipi_dsi_cfg.p_context = dev; in mipi_dsi_renesas_ra_init()
214 R_ICU->IELSR[DT_INST_IRQ_BY_NAME(id, sq0, irq)] = ELC_EVENT_MIPIDSI_SEQ0; \
219 R_ICU->IELSR[DT_INST_IRQ_BY_NAME(id, ferr, irq)] = ELC_EVENT_MIPIDSI_FERR; \