• Home
  • Raw
  • Download

Lines Matching refs:icn

153 static inline int chipone_dsi_write(struct chipone *icn,  const void *seq,  in chipone_dsi_write()  argument
156 struct mipi_dsi_device *dsi = to_mipi_dsi_device(icn->dev); in chipone_dsi_write()
161 #define ICN6211_DSI(icn, seq...) \ argument
164 chipone_dsi_write(icn, d, ARRAY_SIZE(d)); \
169 struct chipone *icn = bridge_to_chipone(bridge); in chipone_enable() local
173 ICN6211_DSI(icn, MIPI_CFG_PW, MIPI_CFG_PW_CONFIG_DSI); in chipone_enable()
175 ICN6211_DSI(icn, HACTIVE_LI, mode->hdisplay & 0xff); in chipone_enable()
177 ICN6211_DSI(icn, VACTIVE_LI, mode->vdisplay & 0xff); in chipone_enable()
183 ICN6211_DSI(icn, VACTIVE_HACTIVE_HI, in chipone_enable()
191 ICN6211_DSI(icn, HFP_LI, hfp & 0xff); in chipone_enable()
192 ICN6211_DSI(icn, HSYNC_LI, hsync & 0xff); in chipone_enable()
193 ICN6211_DSI(icn, HBP_LI, hbp & 0xff); in chipone_enable()
195 ICN6211_DSI(icn, HFP_HSW_HBP_HI, in chipone_enable()
200 ICN6211_DSI(icn, VFP, mode->vsync_start - mode->vdisplay); in chipone_enable()
202 ICN6211_DSI(icn, VSYNC, mode->vsync_end - mode->vsync_start); in chipone_enable()
204 ICN6211_DSI(icn, VBP, mode->vtotal - mode->vsync_end); in chipone_enable()
207 ICN6211_DSI(icn, SYNC_EVENT_DLY, 0x80); in chipone_enable()
208 ICN6211_DSI(icn, HFP_MIN, hfp & 0xff); in chipone_enable()
209 ICN6211_DSI(icn, MIPI_PD_CK_LANE, 0xa0); in chipone_enable()
210 ICN6211_DSI(icn, PLL_CTRL(12), 0xff); in chipone_enable()
211 ICN6211_DSI(icn, BIST_POL, BIST_POL_DE_POL); in chipone_enable()
212 ICN6211_DSI(icn, PLL_CTRL(6), PLL_CTRL_6_MIPI_CLK); in chipone_enable()
213 ICN6211_DSI(icn, PLL_REF_DIV, 0x71); in chipone_enable()
214 ICN6211_DSI(icn, PLL_INT(0), 0x2b); in chipone_enable()
215 ICN6211_DSI(icn, SYS_CTRL(0), 0x40); in chipone_enable()
216 ICN6211_DSI(icn, SYS_CTRL(1), 0x98); in chipone_enable()
219 ICN6211_DSI(icn, MIPI_FORCE_0, 0x20); in chipone_enable()
220 ICN6211_DSI(icn, PLL_CTRL(1), 0x20); in chipone_enable()
221 ICN6211_DSI(icn, CONFIG_FINISH, 0x10); in chipone_enable()
228 struct chipone *icn = bridge_to_chipone(bridge); in chipone_pre_enable() local
231 if (icn->vdd1) { in chipone_pre_enable()
232 ret = regulator_enable(icn->vdd1); in chipone_pre_enable()
234 DRM_DEV_ERROR(icn->dev, in chipone_pre_enable()
238 if (icn->vdd2) { in chipone_pre_enable()
239 ret = regulator_enable(icn->vdd2); in chipone_pre_enable()
241 DRM_DEV_ERROR(icn->dev, in chipone_pre_enable()
245 if (icn->vdd3) { in chipone_pre_enable()
246 ret = regulator_enable(icn->vdd3); in chipone_pre_enable()
248 DRM_DEV_ERROR(icn->dev, in chipone_pre_enable()
252 gpiod_set_value(icn->enable_gpio, 1); in chipone_pre_enable()
259 struct chipone *icn = bridge_to_chipone(bridge); in chipone_post_disable() local
261 if (icn->vdd1) in chipone_post_disable()
262 regulator_disable(icn->vdd1); in chipone_post_disable()
264 if (icn->vdd2) in chipone_post_disable()
265 regulator_disable(icn->vdd2); in chipone_post_disable()
267 if (icn->vdd3) in chipone_post_disable()
268 regulator_disable(icn->vdd3); in chipone_post_disable()
270 gpiod_set_value(icn->enable_gpio, 0); in chipone_post_disable()
275 struct chipone *icn = bridge_to_chipone(bridge); in chipone_attach() local
277 return drm_bridge_attach(bridge->encoder, icn->panel_bridge, bridge, flags); in chipone_attach()
287 static int chipone_parse_dt(struct chipone *icn) in chipone_parse_dt() argument
289 struct device *dev = icn->dev; in chipone_parse_dt()
293 icn->vdd1 = devm_regulator_get_optional(dev, "vdd1"); in chipone_parse_dt()
294 if (IS_ERR(icn->vdd1)) { in chipone_parse_dt()
295 ret = PTR_ERR(icn->vdd1); in chipone_parse_dt()
298 icn->vdd1 = NULL; in chipone_parse_dt()
302 icn->vdd2 = devm_regulator_get_optional(dev, "vdd2"); in chipone_parse_dt()
303 if (IS_ERR(icn->vdd2)) { in chipone_parse_dt()
304 ret = PTR_ERR(icn->vdd2); in chipone_parse_dt()
307 icn->vdd2 = NULL; in chipone_parse_dt()
311 icn->vdd3 = devm_regulator_get_optional(dev, "vdd3"); in chipone_parse_dt()
312 if (IS_ERR(icn->vdd3)) { in chipone_parse_dt()
313 ret = PTR_ERR(icn->vdd3); in chipone_parse_dt()
316 icn->vdd3 = NULL; in chipone_parse_dt()
320 icn->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in chipone_parse_dt()
321 if (IS_ERR(icn->enable_gpio)) { in chipone_parse_dt()
323 return PTR_ERR(icn->enable_gpio); in chipone_parse_dt()
330 icn->panel_bridge = devm_drm_panel_bridge_add(dev, panel); in chipone_parse_dt()
331 if (IS_ERR(icn->panel_bridge)) in chipone_parse_dt()
332 return PTR_ERR(icn->panel_bridge); in chipone_parse_dt()
340 struct chipone *icn; in chipone_probe() local
343 icn = devm_kzalloc(dev, sizeof(struct chipone), GFP_KERNEL); in chipone_probe()
344 if (!icn) in chipone_probe()
347 mipi_dsi_set_drvdata(dsi, icn); in chipone_probe()
348 icn->dev = dev; in chipone_probe()
350 ret = chipone_parse_dt(icn); in chipone_probe()
354 icn->bridge.funcs = &chipone_bridge_funcs; in chipone_probe()
355 icn->bridge.type = DRM_MODE_CONNECTOR_DPI; in chipone_probe()
356 icn->bridge.of_node = dev->of_node; in chipone_probe()
358 drm_bridge_add(&icn->bridge); in chipone_probe()
366 drm_bridge_remove(&icn->bridge); in chipone_probe()
375 struct chipone *icn = mipi_dsi_get_drvdata(dsi); in chipone_remove() local
378 drm_bridge_remove(&icn->bridge); in chipone_remove()